Does this code contain an error?

class A {
  static int a;
public:
  static int GetA() { return this->a; }
};

int A::a = 0;
Explanation
"this" is not defined for static functions of the class
C++
C++ Quiz
Start Quiz

or Read more about C++ Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback