Volume of a spwhere calculator C++

Status
Not open for further replies.

hk3008

Distinguished
Jan 29, 2012
43
0
18,580
Hey Again My Fellow Toms hardware Users I am stuck again lol I am compiling in a New project in a .cpp file.

program is
// Sphere.cpp : main project file.

#include <iostream>
#include <cmath>
using namespace std;

void input(double &);
void convert(double radius, int & feet, double & total);
void ouput(int, double, double);

int main()
{
double total, radius;
int feet;
char yn;
do
{
input (radius);
convert (radius, feet, total);
output (feet, total, radius);

cout << "Enter a Different radius? (y or n)\n";
cin >> yn;
cout << "\n\n";
}
while (yn == 'y' || yn == 'Y');
system("pause");
return 0;
}

void input(double & radius)
{
cout << "---------------------------Re Enter Radius-------------------------\n\n";
cout << "Enter Radius:\n";
cin >> radius;
cout << "\n";

}

void convert(double radius, int & feet, double & total)
{
//=======================================================

total = 3.14 * radius * radius * radius * 4 / 3;

}
//========================================================
void output (int feet, double total, double radius)
{
cout << "---------------------------Re Enter Radius-------------------------\n\n";
cout << "The volume is: " << total << " \n\n";
cout << "--------------------------- Equation -------------------------\n\n";
cout << "The Equation with (" << radius << ") being:\n\n";
cout << "4/3 * 3.14 * (" << radius << ")^3 = " << total << "\n\n";
cout << "--------------------------- Again? -------------------------\n\n";
}

debugging tells me

1>------ Build started: Project: VS2, Configuration: Debug Win32 ------
1>Build started 2/20/2012 12:53:38 AM.
1>InitializeBuildStatus:
1> Touching "Debug\VS2.unsuccessfulbuild".
1>ClCompile:
1> Vs2cpp.cpp
1>c:\users\hk3008\documents\visual studio 2010\projects\vs2\vs2\vs2cpp.cpp(20): error C3861: 'output': identifier not found
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.26
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

so what I am taking from this is

1>c:\users\hk3008\documents\visual studio 2010\projects\vs2\vs2\vs2cpp.cpp(20): error C3861: 'output': identifier not found

how can I tell what output it is talking about? as well what am I messing up in the solution Thank you for all your help guys You Rock!

 
Solution


You misspelled output when you prototyped it ;)
Status
Not open for further replies.