You have declared #include & lt; vector> Code> but this error is actually a detail
you may use it directly in the program
vector<int> sim
The vector is in the STD namespace and should be written as follows
std::vector<int> sim
If you want to use the first method, you need to add using namespace STD;