What should be put instead of // 1 for the code to compile and execute successfully? Select all that apply.
enum E { a = 0, b = 1 };
//1
void main()
{
  C<0> c;
  C<a> d = c;  
}
Explanation
enum is converted to int, so template<int> is perfectly valid. The opposite is not true, so an error will occur in template< E > when trying to cast int (namely, number 0) to E.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты