Jump to content

Featured Replies

Posted

class BitmapObject{

public:

BitmapObject();

~BitmapObject();

HBITMAP BitmapImage;

void LoadBitmapPath(const char* path);

void DrawImage();

BITMAP bm;

PAINTSTRUCT ps;

HDC hdc;

HDC hdcMem;

HBITMAP hbmOld;

}

 

BitmapObject::BitmapObject()

{

BitmapImage = NULL;

BitmapCount++;

}

 

Okay. I'm trying to make a bitmap class. However, when I try to compile this, it gives me two strange errors, centered on the { under BitmapObject constructor.

 

new types may not be defined in a return type

return type specification for constructor invalid

 

What does this mean? I tried setting it as a void, but that was invalid too... it's not returning any values...

Well for starters you're missing a semicolon after then } in your class declaration.

Putting it in the class would be cleaner.

 

Just do 'static short BitmapCount;'

Guest
This topic is now closed to further replies.