How to initialize a static const member in C++?

Viewed 123815

Is it possible to initialize a static const value outside of the constructor? Can it be initialized at the same place where member declarations are found?

class A {
private:
  static const int a = 4;
  /*...*/
};
4 Answers
Related