Hello :-D
I havnt worked much with classes, and i have stumbled onto a problem calling a function from a class.
Here is what my class looks like:
please do not flame me about the typedef, i think it looks purdy :)Code:typedef class TILES { public: void DrawTiles(HWND hwnd); bool bTiles[10][10]; private: int tY; int tX; BITMAP bm; PAINTSTRUCT ps; HDC hdc; HDC hdcMem; HBITMAP hbmOld; HBITMAP hTile; }Tiles;
and my Function calling:
and my error:Code:Tiles::DrawTiles(hwnd);
now, i tried to make the function in the class static, but then i had to make all the variables static, then i got 10 link errors (one for each of the variables i used)Code:D:\CPP\RPGGAME\main.cpp(80) : error C2352: 'TILES::DrawTiles' : illegal call of non-static member function d:\cpp\rpggame\classes.h(6) : see declaration of 'DrawTiles'
This code has been formatted from its original version to fit your screen
[EDIT]
.....Darn Smilies >=[
/EDIT]



LinkBack URL
About LinkBacks


