changes to static variable goes out of scope? (C++)
<p>I have a header file containing static variables, such as window width and height.</p>

<p>I read new values for these variables through a XML file, but these changes does not seem to be registered once the function it was changed in, goes out of scope.</p>

<p>Example to illustrate:</p>

<pre><code>// These are in a separate header file  
static int width = 0;  
static int height = 0;  

aClass::Init()  
{  
    width = readFromXMLFile(); // returning 800  
    height = readFromXMLFile(); // returning 600  

    // Here width and height are 800/600
}

aClass::Run()  
{  
    ...  
}  

Main  
{  
    Init()  
    // Here, width and height are 0/0 again  
    Run()
}  
</code></pre>
