|
\constant\ Member Functions
I once saw a C++ Class declaration like so:
...the following is only what I really can remember.
Now I don't think I know what that const is for on the
end of that function prototype.
Does it mean that this function (whatever()) does not change
the class member variables?
Edited by - Clash Rocker on April 17, 2001 9:41:17 AM
Yep. That means that the function doesn''t change the class''s member variables. Putting the const at the end of the function may enable the compiler to perform some sort of optimization.
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement