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