How const functions will be treated by compiler?
Answer Posted / achal ubbott
A member function can be const qualified. e.g.
class SAAMPLE
{
int m1;
void f() const;
}
Now function f will not be able to modify the value of data
members. If so done the compiler would report an error.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
Is rust better than c++?
What is ios in c++?
How will you call C functions from C ++ and vice-versa?
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What is buffering in c++?
Describe new operator and delete operator?
Is c better than c++?
What is an object in c++?
Define friend function.
How do you establish an is-a relationship?
Is string an object in c++?
What is the copy-and-swap idiom?
Can you sort a set c++?