Answer Posted / som shekhar
If the function is declared constant then you are not
intended to change the member variables of the class and if
you did the compiler throws an error.
In this case you can change the variable inside the const
function if the variable is declared as VOLATILE.
Similarly if you declare a variable as const then you cannot
change the value of the variable through its life time.
Now if you declared the constructor then you cannot
initialize the object.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
what are the events occur in intr activated on interrupt vector table
What is the size of a vector?
Explain the difference between using macro and inline functions?
What is c++ vb?
What is a class template?
What is a multiset c++?
What are the differences between new and malloc?
Can we inherit constructor in c++?
What is the use of 'this' pointer?
What does extern mean in a function declaration in c++?
Describe protected access specifiers?
What are the differences between malloc() and calloc()?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
What is java and c++?
Why c++ is called oop?