Computer Language/C++
[C++] const
정우섭
2020. 2. 8. 17:07
Const Function
1
|
void ShowRecInfo() const;
|
cs |
It means 'In this function the value of member variable will not be changed'.
In const function you can only call const functions, otherwise a compile error will occur.