Member function

Posted on 2005-02-26
Medium Priority
Last Modified: 2010-04-01
Where and all we can use const member function
Question by:nice911

Expert Comment

ID: 13409733
Const function is used when the class required the function like it doesn't modify the any member variable of the function.

int getDate() const;       // A read-only function

int Date::getDate() const
   return month;        // Doesn't modify anything

Accepted Solution

ee_ai_construct earned 0 total points
ID: 13434975
question used to pass points between multiple accounts. (nice911 --> srini_vc)
points forfeit.
question reclosed.

CS Admin

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question