Volume of a spwhere calculator C++

Status
Not open for further replies.

hk3008

Distinguished
Jan 29, 2012
43
0
18,580
0
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!

 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
H Apps General Discussion 3
A Apps General Discussion 6
S Apps General Discussion 1
anoori9000 Apps General Discussion 1
V Apps General Discussion 1
K Apps General Discussion 3
R Apps General Discussion 1
O Apps General Discussion 5
J Apps General Discussion 2
Maksiss3 Apps General Discussion 5
K Apps General Discussion 2
P Apps General Discussion 7
A Apps General Discussion 2
birne Apps General Discussion 24
VedranMik Apps General Discussion 1
B Apps General Discussion 4
R Apps General Discussion 4
F Apps General Discussion 3
resurrection64 Apps General Discussion 6
M Apps General Discussion 2

ASK THE COMMUNITY

TRENDING THREADS