or opostition.....only functions that are declared in "class" or any functions?
I don't understand why ??Anybody can tell me deeply about structures of them...thanks very much....
or opostition.....only functions that are declared in "class" or any functions?
I don't understand why ??Anybody can tell me deeply about structures of them...thanks very much....
Can you please rephrase that? I am having trouble understanding what you've said.
If this is what you mean, you can't call a non const function from within a const function. It is an error to do so. A const member guarantees that the object of which it was called cannot be altered. If you were allowed to call a function that altered the object from within a function that didn't allow you to alter that object, you would have a case of one broken rule.
When you create a const member function you are also changing the implicit this parameter to a pointer to const when that function is called. This ensure that you are flagged with a compile-time error on most situations where you try to alter the object through a const member function. Either by directly manipulating data members or by calling non const functions.
thanks very much for your answer.. Mario F