I am trying to make a simple calculator program, it's not finished yet, but when i try to "compile and run" it in Dev C++, it says there is 39 errors! How can there be thirty nine??
So yeah please help me out by reading through this code and telling me what you think could be the problems. The code looks good to me, but I'm only pretty new to C++...
int main() // main function, calls other functions on request
{
using namespace std;
cout << "Simple Calculator. Written by @@@@@ @@@@@@@@@\n\n";
cout << "\tType 0 for normal functions";
cout << "\n\yType 1 for special functions\n";
double decision;
cin >> decision; // creates the variable for users input
if (decision == 0)
{
normalfun(double decision2)
else specialfun(float)
}
system("pause");
return 0;
}
void normalfun(double decision2)
{
using namespace std;
cout << "\n\tType 1 for addition,";
cout << "\n\tType 2 for subtraction,";
cout << "\n\tType 3 for multiplication,";
cout << "\n\tType 4 for division\n\n";
cin >> decision2;
{
if (decision2 == 1);
add();
if (decision2 == 2);
subtract();
if (decision2 == 3);
multiply();
if (decision2 == 4);
divide();
}
}
void specialfun(float) // special function
{
using namespace std;
cout << "This is special function ";
}
Bookmarks