When you create a static member of a class, you need to initialize it outside of the class:
class test{public: static int var;};int test::var = 10;
Mark Fassett
Laughing Dragon Entertainment
http://www.laughing-dragon.comEdited by - LaughingD on July 12, 2000 12:54:04 AM
Could I ask why you are inheriting C_DDraw for C_StaticSprite?
A better alternative might be to pass in a direct draw pointer to your constructor of your C_StaticSprite.
Add an accessor to your C_DDraw to retrieve the current direct draw pointer.
I could be wrong but it seems you dont need to use inheritance at all. Try this relationship instead. I think this is what you are looking for.
class junk
{
protected:
int x;
};
class junk2
{
protected:
junk local;
};
hope that helps
"Innocent is just a nice way to say ignorant, and stupidity is ignorance with its clothes off."
words of,
skitzo_smurf
"Innocent is just a nice way to say ignorant, and stupidity is ignorance with its clothes off."words of,skitzo_smurf