Why doesn't the following code work when we uncomment the function comp(double& t)? Isn't the funtion supposed to get called when we do, comp c = n?
Code:#include<iostream>
#include<conio.h>
#include<ctype.h>
class comp
{
double r,i;
public:
comp (double rr = 0, double ii = 0)
{
r = rr;
i = ii;
}
/*comp(double &t)
{
r = t;
i = i;
}*/
};
int main()
{
comp a(1.9,4.9), b(0.9,1.9);
double n = 0.1;
comp c = n;
}