cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
quick const question
quick const question
Dec 29, 2010 at 11:13pm UTC
fafner
(377)
I'm trying to get to grips with some code, and I'm seeing this recurring thing that I'm not familiar with. This is an example:
1
2
Foo::
operator
^ (
const
Foo& f)
const
{ ...
What does the last const do in this line?
Peace
Dec 29, 2010 at 11:16pm UTC
m4ster r0shi
(2201)
It means that the object for which this member function
is called is guaranteed not to be modified by the function.
Dec 29, 2010 at 11:19pm UTC
fafner
(377)
Awesome, thanks;)
Dec 29, 2010 at 11:53pm UTC
big o
(3)
I know this link is from Mircrosoft, but it's a pretty good explanation and example:
http://msdn.microsoft.com/en-us/library/6ke686zh(v=vs.80).aspx
Topic archived. No new replies allowed.