Error: non-aggregate type 'vector<int>' cannot be initialized with an initializer list Use g++ -std=c++11 <filename> when compiling.