I would like to define inside a class a constant which value is the maximum possible int. Something like this:
class A { ... static const int ERROR_V
You want:
#include struct A { static const int ERROR_VALUE; }; const int A::ERROR_VALUE = std::numeric_limits::max();
Put the class/struct in a header and the definition in a .cpp file.