dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

C++ Inheritance

 
dev.gamez.lv Forum Index -> Programmēšana
View previous topic :: View next topic  
Author Message
ocer
Guest





PostPosted: Sat Sep 24, 2005 2:15 pm    Post subject: C++ Inheritance

Situaacija shaada:
Code:
int main(.....){
......
SDLClass *sdl = new SDLClass;
GameClass *game = new GameClass;
......
}

ieksh SDL klases man ir keys[...], bildes[...], u.c parametri, kaa vinjus izvilkt Game klasee?
class GameClass : public SDLClass, laikam neliidz, jo tad es netieku pie Atjauninaataas informaacijas, kjipa uz php laikam izskatiisies- global sdlclass...

Arrow ceru, ka saprataat
Back to top
gazz



Joined: 03 Jan 2004
Posts: 355
Location: Teika

PostPosted: Sat Sep 24, 2005 2:53 pm    Post subject:

var izmantot globaalu SDLClass pointeri, var izmantot wraperi singletonu(kau kas liidziigs globaalam pointerim, tikai feinaaks), var SDLClass pointeri tureet kaa GameClass member variabli un galu galaa kaapeec gan lai nestraadaatu class GameClass : public SDLClass ?
Back to top
View user's profile Send e-mail
Display posts from previous:   
dev.gamez.lv Forum Index -> Programmēšana All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group