How const functions will be treated by compiler?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / window
Question is "How const functions will be treated by
compiler?" you guys answered the question "What do you now
about const functions?"
Please do not write what you know. Because of answers like
this, questions in websites are becoming obsolete.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / anil
it not allow to change value of the const variable.
| Is This Answer Correct ? | 0 Yes | 3 No |
What is buffer and example?
List the special characteristics of constructor.
What is class definition in c++ ?
What are the different types of Storage classes?
Is there any difference between int [] a and int a [] in c++?
What is the use of lambda in c++?
What are the extraction and insertion operators in c++? Explain with examples.
Who made c++?
What is the benefit of learning c++?
write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;
the first character in the variable name must be an a) special symbol b) number c) alphabet
what is oops