Answer Posted / nimish singh
One that can be modified by the class even when the object of the class or the member function doing the modification is const.
Understanding this requirement implies an understanding of C++ const, which many programmers do not have. I have seen large class designs that do not employ the const qualifier anywhere. Some of those designs are my own early C++ efforts. One author suggests that some programmers find const to be such a bother that it is easier to ignore const than to try to use it meaningfully. No wonder many programmers don't understand the power and implications of const. Someone who claims to have enough interest in the language and its evolution to keep pace with the ANSI deliberations should not be ignorant of const, however.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain how functions are classified in C++ ?
Why do we use structure in c++?
What is stream and its types in c++?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
Define a constructor?
Which is best c++ or java?
what is VOID?
Write about the local class and mention its use?
What is the latest version on c++?
How to give an alternate name to a namespace?
What is the difference between map and hashmap in c++?
What is the main purpose of overloading operators?
What is ios :: in in c++?
Explain all the C++ concepts using examples.
Out of fgets() and gets() which function is safe to use?