|
From: John E. <j_...@ip...> - 2002-09-18 10:04:54
|
Gudday All,
I have a small problem which I cant seem to find the answer to. I was
hoping that someone could help. I am just beginning to learn c++, so the
code is not to complex. My problem lies in the compilation process. I am
unsure as to how to fix the compilation error.
Thanks to everybody.
Have a good one.
John
Here is the compilation error.
32 six.cpp parse error before `-'
And here is my source code :-
#include <stdio.h>
#include <iostream>
#include <string>
/*
This program in designed to take input from the user,
in the form of a number and compute the output.
The program is then to display the output back to the user.
*/
int FirstNumber(int NumberOne); // Function Definitions
int SecondNumber(int NumberTwo); // Function Definitions
int ThirdNumber(int NumberThree); // Function Definitions
// FirstNumber Function
int FirstNumber(int NumberOne)
{
cout << "Enter how much money you had this morning $";
cin >> NumberOne;
}
// SecondNumber Function
int SecondNumber(int NumberTwo)
{
cout << "Enter how much money you have now $";
cin >> NumberTwo;
}
// ThirdNumber Function
int ThirdNumber(int NumberThree)
{
NumberThree = int NumberOne - int NumberTwo;
cout << "You have spent $" << NumberThree << " dollars today " << endl;
}
// Main Function
int main(int argc, char *argv[])
{
int NumberOne;
int NumberTwo;
int NumberThree;
int FirstNumber(int NumberOne);
int SecondNumber(int NumberTwo);
int ThirdNumber(int NumberThree);
system("PAUSE");
return 0;
}
|