#include <iostream>
using namespace std;
class Complex
{
int re,img;
public:
Complex();
Complex(int, int);
void accept();
void Display();
};
Complex:: Complex()
{
re = 0;
img = 0;
}
Complex::Complex(int r, int i)
{
int re = r;
int img = i;
}
void Complex::Display()
{
cout<<re<<"+"<<img<<" i"<<endl;
}
int main()
{
Complex c1 (0,0);
c1.Display();
return 0;
}
Comments
Leave a comment