static const vs. const static

Viewed 37057

I do not understand the difference between these two statements in my C++ class:

class MyClass {
  public:
  private:
     static const int var = 0;            // Option 1
     const static int var = 0;            // Option 2
};

What is the difference b/w Option 1 and Option 2?? They both compile.

4 Answers
Related