상수 멤버 함수 (const member function)
상수 멤버 함수 (const member function) 1. 개요 class Point{private: int x, y;public :Point(int a = 0, int b = 0) : x(a), y(b) {} void set(int a, int b){x = a;y = b;}void print() const // 상수 멤버 함수 - 모든 멤버를 상수 취급 하는 함수{x = 10; // error cout