//Help to debug the program it shows error with single arument constructor in class polar

template <class T>

class rectangular

{

public:

T xco,yco;

rectangular():xco(0),yco(0){}

rectangular(T x,T y):xco(x),yco(y){}

void display_rect()

{

cout<<"rectangular coordintaes:"<<xco<<","<<yco<<endl;

}

};

template <class S>

class polar

{

S radius,angle;

public:

polar();radius(0),angle(0){}

polar(rectangular r)

{

radius=sqrt(r.xco*r.xco+r.yco*r.yco);

angle=atan(r.yco/r.xco);

}

void display_polar()

{

cout<<"polar coordinates is"<<radius<<","<<angle<<endl;

}

};

void main()

{

polar<double> p;

rectangular <double> r(4.71,30.56);

p=r;

p.display_rect();

cout<<"After conversion"<<endl;

p.display_polar()

}