Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: C++
Expertise: All
Feb 2, 1998

A const member function

Whenever you define a class member function which does not (and should not) change its object, it's a good idea to define it as a const member function. There are two advantages to that: One, you guarantee that this member function is safe to use, because it does not change the state of its objects (i.e, it may not assign new values to members, reallocate memory or activate the object
Danny Kalev
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date