I got strange error why compiling a simple source code in g++:
#include <vector>
int main(int argc, const char* argv[]){
std::vector<int> a{1,2,3};
return 0;
}
The compiler output is
g++ -c -Wall main.cpp
main.cpp:4:20: error: expected ';' at end of declaration
std::vector<int> a{1,2,3};
^
;
1 error generated.
When I compile it in xCode everything works fine.