I have a class which defines the following members in a header file (.hpp):
public :
int loadData(char* filename);
private :
std::vector<vertex> vertices;
std::vector<triangle> triangles;
std::vector<frame> frames;
The vertex, triangle and frame are structures defined in another header file included in this header file.
Now, in the definition of the function loadData in the .cpp, I cannot access the members vertices, triangles and frames. For example, I have the following code resulting in the error shown under it:
cout << "total vertices stored= " << vertices.size() << endl;
motionViewer.cpp:59: error: 'vertices' was not declared in this scope
Why cannot I access these members?
Thank you for the help.
A blind shot: because you forget to put the class-name before the loadData-method in your .cpp:
But to be sure you need to show more code.