When I try to initialize a vector
of int
s, I always get this error:
expected ';' at end of declaration
I used the original code from "C++ Primer":
vector<int> v{1,2,3,4,5,6,7,8,9};
and
$ g++ -o test test.cpp
I think this is a silly question to ask, but I am sure that there is a ;
. I cannot manage to find an answer.