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
Зареєструйся Зараз
або Підпишись на майбутні тести