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

Is facebook written in c++?

649


How do you establish a has-a relationship?

695


Write a program to add three numbers in C++ utilizing classes.

721


Can c++ do everything c can?

695


What will happen if a pointer is deleted twice?

809






What do you mean by inheritance in c++? Explain its types.

708


What is the benefit of c++?

695


What is the difference between global variables and local variable

616


What is an operator function? Describe the function of an operator function?

718


Write is a binary search tree? Write an algo and tell complexity?

690


Explain how would you handle a situation where you cannot call the destructor of a local explicitly?

623


How can you quickly find the number of elements stored in a dynamic array?

692


What are c++ tokens?

693


What is array in c++ pdf?

660


What is the best book for c++ beginners?

668