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