#ifndef CGRAPHICS_H
#define CGRAPHICS_H
#include <GL/gl.h>
#include <windows.h>
class CGraphics
{
public:
CGraphics();
~CGraphics();
CGraphics( const CGraphics& other );
CGraphics& operator=( const CGraphics& other );
void make3D( bool );
void move( int, int );
void move( int, int, int );
int gexX() {return x;};
int getY() {return y;};
int getZ() {return z;};
protected:
int x, y, z;
bool is3D;
};
#endif // CGRAPHICS_H
I also get that error with my CRectangle class, which inherits from CGraphics. Near as I can tell, it's saying that there's something wrong with my class declaration, but I have no idea what. Does anyone know what this error means or, more importantly, how to make it go away and never come back?
If you're not using headers don't include them. I have a slight idea that maybe through the evilness of windows.h and the randomness of openGL that CGraphics already exists...
I tried removing those includes but I still get the same error, so it's probably not that. I'm somewhat familiar with the OpenGL library and I'm fairly sure that there's nothing titled CGraphics in it, but idk anything about windows.h. I'll try renaming everything and hope that works.
I changed my class names from CGraphics and CRectangle to Graphics2D and Rectangle, respectively, and I'm still getting the same error.
This might be a result of an incorrect extension. Make sure that your source file's extension is .CPP. If the file has a .C extension, the compiler will interpret the source file as C code, not C++.