fork download
  1. #include <map>
  2. #include <vector>
  3.  
  4. class Test
  5. {
  6. public:
  7.  
  8. void bat(std::vector<int> k = std::vector<int>()) {}
  9. void cat(std::map<int, std::vector<int> > k = std::map<int, std::vector<int> >
  10. ()) {}
  11.  
  12. };
  13.  
  14. int main() {
  15.  
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:9: error: expected ‘,’ or ‘...’ before ‘>’ token
prog.cpp:9: error: wrong number of template arguments (1, should be 4)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_map.h:91: error: provided for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
prog.cpp:10: error: default argument missing for parameter 2 of ‘void Test::cat(std::map<int, std::vector<int, std::allocator<int> >, std::less<int>, std::allocator<std::pair<const int, std::vector<int, std::allocator<int> > > > >, std::vector<int, std::allocator<int> >)’
stdout
Standard output is empty