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
2 months agoZona
1 months agoGlendora
1 months agoAdolph
2 months agoMitsue
2 months agoJoni
3 months agoBeckie
3 months agoCallie
2 months agoWilford
2 months agoMarylou
2 months agoBobbye
3 months agoStevie
3 months agoDerick
3 months agoLuann
3 months agoNu
3 months agoPura
3 months ago