What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class complex{
double re;
double im;
public:
complex() : re(1),im(0.4) {}
bool operator==(complex &t);
};
bool complex::operator == (complex &t){
if((this?>re == t.re) && (this?>im == t.im))
return true;
else
return false;
}
int main(){
complex c1,c2;
if (c1==c2)
cout << "OK";
else {
cout << "ERROR";
}
}
Layla
1 months agoZona
5 days agoGlendora
11 days agoAdolph
22 days agoMitsue
1 months agoJoni
2 months agoBeckie
2 months agoCallie
21 days agoWilford
1 months agoMarylou
1 months agoBobbye
2 months agoStevie
2 months agoDerick
2 months agoLuann
2 months agoNu
2 months agoPura
2 months ago