C++ prog. How can I "class type" to double?
class SIDE
{
private:
double a;
public:
SIDE() {a=0;}
SIDE(double x){a=x;}
};
class TRIANGLE
{
private:
SIDE a,b,c;
public:
Harom();
Harom(Oldal x,Oldal y,Oldal z)
{
a=x;
b=y;
c=z;
}
****************
double Gir()
{
return a+b+c;
}
*********************
My problem is between the stars: how can I get back a double value?
Thank you for helping me!
Domonkos
C++ prog. How can I "class type" to double?c++ jobs
With this modified code:
class SIDE
{
private:
double a;
public:
SIDE() {a=0;}
SIDE(double x){a=x;}
double value() { return a; } ///modified
};
class TRIANGLE
{
private:
SIDE a,b,c;
public:
Harom();
Harom(Oldal x,Oldal y,Oldal z)
{
a=x;
b=y;
c=z;
}
double Gir()
{
return a.value()+b.value()+c.value(); //modified
}
C++ prog. How can I "class type" to double?c++ builder
Allow me to make a suggestion that will make you a better programmer and will help you debug problems like this.
More Related Questions and Answers ...
The information post by website user , we not guarantee correctness.
Dental Treatment Skin Whitening Skin Problems Skin Rashes Shoes
