the question is
Construct a class named Coord that contain two floating –point data member named xval and yval , which will be used to store the x and y values of a point in rectangular coordinates. The function member should include appropriate constructor and display functions and friend function named conv_pol (). The conv_pol() function should accept two floating point member that represent a point in polar coordinates and convert them into rectangular coordinates .
and here's my coding..
the error says no appropriate default constructor not initialized but then.. have already done Coord(float,float) which is the default constructor..
using namespace std;
friend Coord conv_pol( float ,float);
Coord::Coord(float x,float y)
xval = x;
yval = y;
Coord conv_pol(float x,float y)
temp.xval = temp.yval*cos(temp.yval*3.142 /180);
temp.yval = temp.yval*sin(temp.yval*3.142 /180);
i am confused on how to edit the constructor here..
so what do i have to do??