This site is no longer active and is available for archival purposes only. Registration and login is disabled.

c++ newbie question about scope !


c++ newbie question about scope !

Postby stuff » Jun 9, 2007 @ 1:08pm

I've used the "Create a complete game" tutorial to start coding my game.

The only thing I can't manage to do is using ClassMain simple methods like GetFPS or Log within a "module". What is the correct way to do this ?

(I managed to use them, by declaring ClassMain *main as a global var, which is the worst thing to do IMO...)

could someone help ?

thx !
stuff
pm Member
 
Posts: 41
Joined: Feb 2, 2003 @ 5:22pm


Postby edge » Jun 11, 2007 @ 2:47pm

Hi Stuff,

We recommend making the *main pointer part of SHARED_DATA instead of global. Other than that, everything seems OK.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby stuff » Jun 11, 2007 @ 2:58pm

thank you.
I've finally did it like that.
I wondered if it was the best way !
stuff
pm Member
 
Posts: 41
Joined: Feb 2, 2003 @ 5:22pm


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

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 post attachments in this forum

cron