Pinyo's Programming and Software Notes

Saturday, June 03, 2006

Static variable in VC++
(June 3, 2006)

Static constant variables and static variables have different initialization. For static constants, we do not initialize it again in source code outside header, but, for static n0n-constants, we need to initialize it in global area. If we try to initialize static constants in the global area, we will have a linking problem. The compiler will consider another initialization as a duplicate.

0 Comments:

Post a Comment

<< Home