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
what is a reference variable in C++?
What is meant by the term name mangling in c++?
How much maximum can you allocate in a single call to malloc()?
What you know about structures in C++?
How is computer programming useful in real life?
What are maps in c++?
What is array give example?
What is the benefit of c++?
Difference between class and structure.
What do you mean by delegate? Can a user retain delegates?
What is an accessor in c++?
What is the purpose of ios::basefield in the following statement?
Is c++ low level?
Is c++ a dying language?
Write a struct time where integer m, h, s are its members?