till' yet I've thougt cone is something to eat you've written a little bit complicated...
Zitat:
no match for 'ostream & = double'
this failure is here
C++:
cout << volume = 1/3.0 * PI * pow(RADIUS,2) * HEIGHT; //in this case you would have to use brackets cout << volume = (1/3.0 * PI * pow(RADIUS,2) * HEIGHT); //in this case you would have to
there are still some other strange things in you code
try this perhaps
C++:
#include <iostream> #include <cmath>
#ifndef M_PI //in most cases pi is defined as M_PI in cmath ohterwise we define it #define M_PI 3.1415926535897932384626433832795 #endif
//calculates the volume of a cone double volume_cone(double radius, double height){return M_PI*radius*radius*height/3.;}
int main (){ std::cout << "The Volume of the Cone is: "<<volume_cone(20.,25.)<<std::endl; return0; }
-- ...fleißig wie zwei WeißbroteDieser Post wurde am 21.09.2004 um 04:51 Uhr von Windalf editiert.