Reasonably new to C ++, I'm trying to use vectors in my application. I use
#include <vector>
in the header file, but when I compile it, it does not work on this line:
std::vector<Shot> shot_list;
Noting error E2316 'vector' is not a member of 'std'
If I remove std ::, it displays a compiler error message. Really at a loss with this. If there is no problem using
std::list<Shot> shot_list;
before using vectors.
Here is a simple example that does not compile:
#ifndef testclassH
#define testclassH
#include <vector>
class TestClass {
private:
std::vector<int> testVect(1);
};
#endif
For me, I see no difference between this and this example
source
share