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

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з C++
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести