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
3 months agoWhitney
3 months agoJeannetta
3 months agoJodi
2 months agoParis
2 months agoMitzie
2 months agoNu
3 months agoFrancoise
3 months agoAnnabelle
1 months agoRikki
1 months agoBreana
2 months agoHyman
4 months agoJuliana
4 months agoHyman
4 months ago