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:
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;
please do not flame me about the typedef, i think it looks purdy :)
and my Function calling:
Code:
Tiles::DrawTiles(hwnd);
and my error:
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'
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)
This code has been formatted from its original version to fit your screen
[EDIT]
.....Darn Smilies >=[
/EDIT]