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 |
When does the c++ compiler create temporary variables?
How can we check whether the contents of two structure variables are same or not?
Write a program to find the Fibonacci series recursively.
What is input operator in c++?
What do you know about friend class and friend function?
how many trys can we write in one class
Why do we use string in c++?
why v use c++ even we have microprocessor
What is Name Decoration?
How can we read/write Structures from/to data files?
What is the difference between Char a[ ]=”string” and char *a=”String”
What is the error in the code below and how should it be corrected?