Life' Variable

Hi All,

I converted my application from win32 to sdl. I just re-added my files
in projects. I got a files, config.cpp, who?s taking care of loading
variable in my config.dat and save these globals variable at the start
of the program. So, at the initialization, I was just adding my line
LoadConfig() and it was saving my globals. Actually in sdl now it?s
still loading but the major problem is if I one to use one of these
variables(imported from config.dat) LoadConfig() has to be in the same
function where I want to use these variable ex:

I got a global variable a and b defined in global.h

?
void InitApp() {
?
LoadConfig()
?
}

void Draw() {
?
DoSomething(a);
DoToB(b);
?
}

If I use this format, a and b will be equal to 0 or NULL in order to get
the value it has to be that way :

void Draw() {
?
LoadConfig()

DoSomething(a);
DoToB(b);
?
}

I never had this problem using w32 so I would like to know on how to get
rid of this problem because actually it reloads the config file
everytime it draws to screen in order to get the value I need ?

Thanks,

Alex—
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.514 / Virus Database: 312 - Release Date: 8/28/2003