This is a discussion on Const means? within the C and C++ Programming forums, part of the Software Development category; Hi everyone, I have a question of "const". char* dump() const; What does the "const" mean? ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| The keyword 'const' makes the function constant. Only member function of class can be constant. Constantness of member function means that value for any variable of the program cannot be changed in this function.
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
| |||
| the word const simply means nothing but do not change it, for example if it was a function that will return maybe age it simply means it must bring age as it is.
__________________ Krishnakumar.S Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily |
| |||
| That isn't correct. const methods can still change global values, they just can't change fields of the object on which they're called. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/c-c-programming/4054-const-means.html | |||
| Posted By | For | Type | Date |
| DiscussWeb IT Community - Technical Support and Technology Discussions | This thread | Refback | 11-25-2007 07:45 PM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can we use AT commands in j2me? means how can we pass an AT command one phone to | mobilegeek | J2ME | 1 | 11-10-2007 01:35 AM |
| What are the different ways to login to a remote server? Explain the means, advantage | Sabari | Server Management | 0 | 09-12-2007 12:36 PM |
| What means by Java Native Interface?Benifits of its | prasath | Java Programming | 1 | 07-19-2007 04:04 AM |
| What SPAM means in easy word? | montyauto | Advertising Sales and Affiliate Programs | 5 | 03-14-2007 10:35 PM |