What happens when you attempt to compile and run the following code?
#include
using namespace std;
class complex{
double re;
double im;
public:
complex() : re(0),im(0) {}
complex(double x) { re=x,im=x;};
complex(double x,double y) { re=x,im=y;}
void print() { cout << re << " " << im;}
};
int main(){
complex c1(1,2);
c1.print();
return 0;
}
Cornell
8 days agoWhitney
9 days agoJeannetta
10 days agoNu
12 days agoFrancoise
13 days agoHyman
2 months agoJuliana
2 months agoHyman
2 months ago