I've tried including the vector into the class. But it seems C++ "structures" don't support the advanced variable definition such as "vector".
The compiler says (always) :
syntax error : missing ';' before '<'
error C2501: 'vector' : missing storage-class or type specifiers
error C2059: syntax error : '<'
error C2238: unexpected token(s) preceding ';' |
I review the code carefully, but I don't know why the error appears.
This is my code (class)
1 2 3 4 5 6 7 8
|
#include <vector>
class UnitManager
{
public :
///////////////////////////
vector <float> UnitHP; // error!!!
}
|
Does anyone know?
Last edited on
std::vector<float> UnitHP
...
Oh so thanks! I forgot "using namespace std"...
Silly...