Are there errors in the following code?

class A {
  int a;
public:
  static int GetA() { return a; }
};
Explanation
Static class members do not have access to non-static ones

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback