View Full Version : constructor issues...

10-09-2002, 02:30 PM
This is more of a C++ issue I think, but I ran into this error while working on my Font class. Here's the header file where the error is.

class CFONT {


CFONT( HDC hdc, int size, string fontName );

void Kill();
void SetColor( float r, float g, float b );
void Print( float x, float y, const char *fmt, ... );


unsigned int base;

float red, green, blue;


Here's the output...
d:\documents and settings\brian\desktop\alone\cfont.h(16) : error C2629: unexpected 'class CFONT ('
d:\documents and settings\brian\desktop\alone\cfont.h(16) : error C2238: unexpected token(s) preceding ';'
d:\documents and settings\brian\desktop\alone\cfont.cpp(3) : error C2061: syntax error : identifier 'string'
d:\documents and settings\brian\desktop\alone\cfont.cpp(3) : error C2511: 'CFONT::CFONT' : overloaded member function 'void (struct HDC__ *,int)' not found in 'CFONT'
d:\documents and settings\brian\desktop\alone\cfont.h(12) : see declaration of 'CFONT'

Apparently there is a problem with my constructor, but I can't spot it.


10-09-2002, 02:44 PM
Nevermind I got it ! http://www.opengl.org/discussion_boards/ubb/smile.gif