Thursday, February 25, 2016

[C++] function and const

A member function defined is const :
A function_name(...) const
   this function will not modify the class member(except ones that are marked mutable).

A parameter is const : 
A function_name(const int c)
 this function will not change the input parameter.


No comments:

Post a Comment