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.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
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.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
thanks very much for your answer.. Mario F