Why can you not make a constructor as const?

Answer Posted / som shekhar

Sorry the keyword is not volatile ,its mutable.
if the member varible of the class is declared as mutable
then you can change its value in a function which is
declared as constant.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.

2432


How do you invoke a base member function from a derived class in which you’ve overridden that function?

577


What is namespace std; and what is consists of?

659


What is auto used for in c++?

558


Explain queue. How it can be implemented?

667






Describe protected access specifiers?

669


What are the advantages of prototyping?

559


What is the difference between the parameter to a template and the parameter to a function?

626


What is the use of string in c++?

544


Explain how functions are classified in C++ ?

798


What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

691


What are all predefined data types in c++?

552


What is a singleton c++?

543


What is the difference between equal to (==) and assignment operator (=)?

572


If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?

581