Hello all. So I have two classes:
Parent Class: Load
Child Class: Blit
When I separate the two objects like I have below,
cLoad.LoadPicture()
always comes back false and I error checked the function so I know it is
error free.
1 2 3 4 5 6 7
|
Load cLoad;
if(cLoad.LoadPictures() == false)
return 21;
Blit cBlit;
if(cBlit.LoadPictures() == false)
return 31;
|
BUT, when I initialize the child and parent class before I call
any function from either I get no error. It would look like this:
1 2 3 4 5 6 7 8
|
Load cLoad;
Blit cBlit;
if(cLoad.LoadPictures() == false || cLoad.LoadSounds() == false)
return 21;
if(cBlit.LoadPictures() == false)
return 31;
|
It is like I can't initialize the parent class object without the
child class object being initialized. Can someone please shed some
light on this. Thanks.
EDIT:
I just realized I do not have to call the
cLoad.LoadSounds() function from
the base class because the child class can do the exact same thing but
still...why am getting the original problem?