Which class A declarations will produce the compilation error in an attempt to create the class object
Explanation
Due to the fact, that all the constants and references should be initialized, the class containing a reference or constant members, couldn't be constructed by default. That's why for class A declarations options:
struct A
{
     const int a;
};
and
struct A
{
    int& a;
};
You must explicitly create the appropriate constructor, in which constant or reference will be initialised.

Слідкуй за CodeGalaxy

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

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