0

What is the use of static const members in c++?

please can anyone explain me static const members

25th Feb 2017, 2:12 PM
Krishna Subhash Sonawane
Krishna Subhash Sonawane - avatar
5 Answers
+ 2
const. means that it CANNOT be changed. no matter what. nit even temporarily. static is like a global. where you can call it or use it anywhere for anything. a static member of a class could be incremented by one object and printed by another and it would be the value od what the other object incremented it to. I've used static variables to assign key values to specific objects. to identify uniqueness. hope this helps
26th Feb 2017, 4:57 AM
Michael Szczepanski
Michael Szczepanski - avatar
+ 1
thank u sir
26th Feb 2017, 5:58 AM
Krishna Subhash Sonawane
Krishna Subhash Sonawane - avatar
+ 1
singleton class?? I have never heard of this :/
26th Feb 2017, 6:04 AM
Michael Szczepanski
Michael Szczepanski - avatar
+ 1
No use😂😂😂😂
1st Mar 2017, 6:18 AM
Jessy Matthew Thomas
Jessy Matthew Thomas - avatar
0
so is it used to create singleton class?
26th Feb 2017, 6:00 AM
Krishna Subhash Sonawane
Krishna Subhash Sonawane - avatar