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
Define friend function.
What is namespace & why it is used in c++?
What is null pointer and void pointer?
What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass
Is c++ low level?
Is map ordered c++?
What is a responder chain?
What are the unique features of C++.
What is searching?
Do you know what are pure virtual functions?
What language does google use?
When do we run a shell in the unix system?
What is time_t c++?
Is eclipse good for c++?
What is the use of turbo c++?