error: ‘vector‘ was not declared in this scope|

You have declared #include & lt; vector> 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;

Read More: