class dataReader{
private:
ifstream gfxDataFile;
int numVertices;
vector<*vertexData> vertices;
public:
dataReader();
dataReader(string file);
~dataReader();
string getLine();
int numberOfVertices();
};
the line with the vector gives me the error
vertexData: Illegal use of this type as an expression, any help guys?
Heres the definition of vertexData
class vertexData{
private:
float x;
float y;
float z;
public:
vertexData();
vertexData(float gx, float gy, float gz);
~vertexData();
float getX();
float getY();
float getZ();
};
*vertexDatashould bevertexData*Putting the
*on the left means, broadly, ‘try to dereference the following expression’ – and of course what follows is not a valid expression (though even if it were you’d have other problems trying to use an expression inside a template argument list…). When declaring pointer types the*goes on the right of the type name.