Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/30/11 09:15
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#183947 - Static class member varibles?
Responding to: ???'s previous message
As an extension of C, you can use regular static variables as usual.

You can also declare a class member variable (I'll ignore static methods) to be static, which means there is only one instance of the class variable that gets shared between all objects of that class. Class static variables exist within the scope of the class, so to access them you need to use scope resolution operator (the ::) to specify the class of the variable.

List of 15 messages in thread
TopicAuthorDate
static variables in C++            01/01/70 00:00      
   words of one syllable or less?            01/01/70 00:00      
      not really            01/01/70 00:00      
         Semaphore            01/01/70 00:00      
   Static class member varibles?            01/01/70 00:00      
      depends on active scope            01/01/70 00:00      
      You see            01/01/70 00:00      
         Namespace            01/01/70 00:00      
         Disagree about classes            01/01/70 00:00      
            Yeah i suppose            01/01/70 00:00      
   Static variable?            01/01/70 00:00      
      oxymoron            01/01/70 00:00      
         Not to mention            01/01/70 00:00      
            Or even            01/01/70 00:00      
         oxymoron            01/01/70 00:00      

Back to Subject List