Does the code contain errors that prevent the code from compiling?
class A {
  const int a;
  A() { a = 10; }
};
Explanation
constant class members must be initialized in the constructor initialization list.

Слідкуй за CodeGalaxy

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

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