Ask your own question, for FREE!
Computer Science 21 Online
OpenStudy (anonymous):

if we have private data member that's means we can't access this variabel outside of that class,so why we add static after private? , as I know static mean this var it's class variable and it's mean also we can't acess it's outside the class.

OpenStudy (anonymous):

so what you exactly want to know??? do you have any bugs while coding or you are not clear with the concept?

OpenStudy (anonymous):

http://www.learncpp.com/cpp-tutorial/811-static-member-variables/ in C++, static member variables of classes are 'shared' among the instances of the class i.e. everytime the variable is referenced by the objects, it is the same variable. Contrast this to non-const non-static member variables of classes. http://ideone.com/YrxNZ

OpenStudy (anonymous):

@krithika : I'm not clear with the concept. #agdgdgdwngo : thanks, it's very helpul

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!