// instead of #define N 5 const int N = 5; int R; class A { int a; public: // int is already const: const int f(...) const int f(const int n) const { N = 1; // forbidden !! n = 3; // forbidden (2nd const) a = 2; // forbidden (3rd const) R = 5; // allowed } };