You need to mention, which standard is under use of c++ in the case of vectors. Such as a file name with [code], so to create an executable file for [code] with vectors , terminal code will be g++ -std=c++11 code.cpp && ./a.out to execute and run the code