C++ prog. How can I "class type" to double?

 Dont Buy Textbooks. Rent 'EM Save 60-80%



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.


FirstPrevious12NextEnd

More Related Questions and Answers ...
  • I need a free download to C&C yuri&#0..
  • How to learn and download c++ programming lan..
  • Where to download C&3 1.05's pat..
  • Who has this phone?!?!?!?
  • How to determine the double bond (C=C) conten..
  • How can i hold onto the double high c?
  • What is the hybridization for C-C double and ..
  • How do I convert a string (with a dollar sign..
  • Why does benzene have bond length intermediar..
  • How do you beat the bonus lvl on S.C. Double ..
  • Cannot open my C drive with double click?
  • MS32DLL.dll.vbs not able to open C drive by d..
  • I've removed one script from my c dr..
  • C# Save to file?
  • Where can I download c++???????? pls help?
  • How to download 'c' and &am..
  • Download C++?
  • Can i download C from the net???
  • C++ prog. How can I "class type" to..

  • The information post by website user , we not guarantee correctness.

    

    Dental Treatment Skin Whitening Skin Problems Skin Rashes Shoes