Hi I need help with some C++ code. It's pretty basic, but my teacher will not help me. He keeps saying "Just one second, I'm helping someone else." And then forgets about me. It just gets frusturating. The code is very undeveloped though, I'm just trying to get all the basic bugs out. It's supposed to calculate tax based on income and marriage status. Here it is:
#include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
using namespace std;
int marriage();
int marincome();
int sincome();
int main()
{
system("cls");
marriage();
return 0;
}
int marriage()
{
string status = " ";
cout << "Are you married?" << endl;
cin >> status;
if status = "Yes";
{
marincome();
}
else if status = "No";
{
sincome();
}
else
{
goto
return 1;
}
int marincome()
{
int remainder = 0;
remainder = dividend % divisor;
return 0;
}
Here are my errors:
(31) : error C2061: syntax error : identifier 'status'
(35) : error C2181: illegal else without matching if
(35) : error C2061: syntax error : identifier 'status'
(40) : error C2181: illegal else without matching if
(44) : error C2059: syntax error : 'return'
(48) : error C2601: 'marincome' : local function definitions are illegal
(25): this line contains a '{' which has not yet been matched
(53) : fatal error C1075: end of file found before the left brace '{'
What's really bothering me is all the illegal elses. Also many of these errors I think I can fix myself, but I just didn't have the time if I wanted to get any help. Thanks in advance.