Which lines contain errors?
#include <string>
using std::string;

class A { };

void operator&(int, int);       //1
void operator&(A, int) { }      //2
void operator&(int, const A&);  //3
void operator&(A, A);           //4
void operator&(A*, A*) { }      //5
Explanation
Operators can only be overloaded for non-trivial types and enum, so the first and fifth lines are incorrect.

Следи за CodeGalaxy

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

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