fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. int main()
  5. {
  6. std::vector xs;
  7. xs.push_back("hello");
  8. xs.push_back("world");
  9. for (auto x : xs)
  10. std::cout << x << std::endl;
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:6:14: error: missing template arguments before 'xs'
  std::vector xs;
              ^
prog.cpp:7:2: error: 'xs' was not declared in this scope
  xs.push_back("hello");
  ^
prog.cpp:9:16: error: unable to deduce 'auto&&' from 'xs'
  for (auto x : xs)
                ^
stdout
Standard output is empty