Try:
std::vector<int> otherOrder;
vector
is part of the std
namespace. This means that whenever you use a vector
in a header file, you should include the std::
prefix.
The reason that you can sometimes get away with forgetting it is that some included files may have using namespace std;
in them, allowing you to leave off the prefix. However, you should avoid the using
keyword in header files, for it will pollute the namespace of any files that include
it.
For a more detailed explanation of the dangers of using namespace ...
, see this thread.