I am defining a structure in a header file, and then setting its members in the corrosponding .cpp file. For doing this I am using a function that is supposed to create a (s
You need to qualify Drawable
in the cpp file:
GLWindow::Drawable GLWindow :: CreateDrawable(GLfloat *C_vertices, GLfloat *C_tex, GLfloat *C_normals, GLushort *C_facedata, int faces)
In the cpp file, outside the member methods, you're operating outside the class context. Inside the methods you can use Drawable
, but outside (including return type), you need to use GLWindow::Drawable
.
That's if you're actually returning a Drawable
from the method, not a void
- also an error.