Now i have One more error and my code "should be" completely debugged.(Till i add something else :P)
Code:
HTML Code:
//Includes:
#include <cstdlib>
#include <iostream>
#include <string>
#include "AllMath_H.h"
int main()
{
int looping = 0;
using namespace std;
string choice1;
while (looping == 0)
{
system("cls");
cout << "====================================================" << endl;
cout << "==== Main Menu ====" << endl;
cout << "====================================================" << endl;
cout << "====================================================" << endl;
cout << "==== Please enter what calculation you want. ====" << endl;
cout << "==== A. Find the area of a shape. ====" << endl;
cout << "==== B. basic calculation.(not implemented yet) ====" << endl;
cout << "====================================================" << endl;
cout << "====================================================" << endl;
cout << "Please Choose: ";
cin >> choice1;
cout << " ";
if (choice1 == "A")
{
system("cls");
cout << "Please enter what shape you want to find the area of(circle, triangle, or square. CAP SENSITIVE)" << endl;
string choice;
cin >> choice;
if ( choice == "circle" )//CIRCLE CHOICE
{
system("cls");
cout << "Please enter the radius of your circle" << endl;
int x;
cin >> x;
findAreaOfCircle(x);
cout << "Do you want to use the calculator again?" << endl;
string awnser;
cin >> awnser;
if (awnser == "no")
{
cout << "goodbye!" << endl;
looping = 1;
}
}
else if ( choice == "square")//square choice
{
system("cls");
int L;
int H;
cout << "Please enter the length of your square" << endl;
cin >> L;
cout << "Please enter the heigth of your square" << endl;
cin >> H;
findAreaOfSquare(L,H);
cout << "Do you want to use the calculator again?" << endl;
string awnser;
cin >> awnser;
if (awnser == "no")
{
cout << "goodbye!" << endl;
looping = 1;
}
}
else if ( choice == "triangle" )//Triangle choice
{
system("cls");
int H;
int B;
cout << "Please enter the base of your triangle" << endl;
cin >> B;
cout << "Please enter the heigth of your triange" << endl;
cin >> H;
FindAreaOfTriangle(H,B);
cout << "Do you want to use the calculator again?" << endl;
string awnser;
cin >> awnser;
if (awnser == "no")
{
cout << "goodbye!" << endl;
looping = 1;
}
}
}
else if (choice1 == "B")
{
cout << "Please choose what operation you wish to do." << endl;
string choice;
cin >> choice;
if (choice == "add")
{
int a;
int b;
system("cls");
cout << "Please enter a number" << endl;
cin >> a;
cout << "Please enter another number" << endl;
cin >> b;
add(a,b);
cout << "Do you want to use the calculator again?" << endl;
string awnser;
cin >> awnser;
if (awnser == "no")
{
cout << "goodbye!" << endl;
looping = 1;
}
}
else if(choice == "subtract")
{
int a;
int b;
system("cls");
cout << "Whats the minuend?" << endl;
cin >> a;
cout << "whats the subtrahend?" << endl;
cin >> b;
subtract(a,b);
cout << "Do you want to use the calculator again?" << endl;
string awnser;
cin >> awnser;
if (awnser == "no")
{
cout << "goodbye!" << endl;
looping = 1;
}
return 0;
}
Now thats the Entire Main() function the error is as follows:
1>c:\users\dad\documents\visual studio 2008\projects\calculator1\calculator1\calculator1. cpp(201) : fatal error C1075: end of file found before the left brace '{' at 'c:\users\dad\documents\visual studio 2008\projects\calculator1\calculator1\calculator1. cpp(141)' was matched
Now i have no idea how to fix this.