--- mano M <[EMAIL PROTECTED]> wrote: > Hi, > > When a static variable got initilized? > At compilation time or loading time? > If it's compliation time ,does the exe contain the > inilized values? Then how do we able to change that > varible run time ? > Exe conatin the data segment ot it creats at the > time of loading? > > Is it the same in case C++? .Because we re > initilizing in constructor .. that means run time .. > Could some one clarify dobut. > > Rgards > Mano
Partial answer. When you create a static variable, the memory address is static. You can change the value of that variable at any time. In C++, a static veriable in a class is not initialized in the constructor. A static class variable exists when there is not an instance of the class (part of the reason for creating a static class variable). Ray ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
