what's the problem of my program?

closed account (28RDSL3A)
#include <iostream>
#include <conio.h>
#include <windows.h>
#include <string.h>


using std:: string;
using namespace std;

void tax();

main()
{
char clas;


cout<<"[A]Resident Citizen"<<endl<<"[B]Nonresident Citizens"<<endl<<"[C]Resident Aliens"<<endl<<"[D]Nonresident aliens engaged in trade or business"<<endl;
cout<<"Choose where you are classified:";
cin>>clas;


switch (clas)
{
case 'A':
case 'a':
tax();
break;
case 'B':
case 'b':
tax();
break;
case 'C':
case 'c':
tax();
break;
case 'D':
case 'd':
tax();
break;

default:
cout<<"Wrong Input";
break;

getch();

}}

void tax()
{
int year, tin, rdo, birth, zip, num;
char stat;
string name=" ";
string add="";



cout<<"For the Year: ";
cin>> year;
cout<<"TIN Number: ";
cin>> tin;
cout<<"RDO Code: ";
cin>> rdo;
cout<<"Tax Payers Name(Last Name, First Name, Middle Name): ";
getline(cin, name);
cout<< endl;
cout<<"Registerd Address: ";
getline(cin, add);
cout<<"Date of Birth (MM/DD/YYYY): ";
cin>> birth;
cout<<"Zip Code: ";
cin>> zip;
cout<<"Contact Number: ";
cin>> num;


cout<<"[A] Single"<<endl<<"[B] Head of the Family"<<endl<<"[C] Married"<<endl<<"[D] Widow"<<endl;
cout<<"Exemption Status: ";
cin>> stat;






getch();







}










You need to explicitly describe the problem you're having with the program rather than leave us guessing what your issue is and use the code tags to post your code. Function main must return an int: int main(). Also missing return 0; Also reevaluate your switch statement, it's a bit pointless they way it's written as ultimately a-d will lead to a function call to tax(), unless you plan on adding functions specific to each selection.
closed account (28RDSL3A)
im sorry..

our problem is that we can't input name..because it directly go to address..

closed account (28RDSL3A)
i have already solve..thank a lot... our case study about personal income tax is quit hard..
Topic archived. No new replies allowed.