Professional Documents
Culture Documents
void main_menu();
void see_info ();
void add_info();
void add_member ();
int term();
void main_menu()
{
int n;
cout << " 1. See Information " << endl ;
cout << " 2. Add Information " << endl ;
cout << " 3. Terminate The Program " << endl ;
void see_info ()
{
int n;
cout<< " 1. View Member " << endl ;
cout<< " 2. History " << endl;
cout<< " 3. Return To Main Menu " << endl ;
void add_info()
{
int n;
cout<< " 1. Add Member " << endl ;
cout<< " 2. Return To Main Menu " << endl ;
int term()
{
return 0 ;
}
struct Member
{
string ID;
char name[20];
char add[20];
};
void add_member ()
{
int n,y;
cout << "To Add Press 1 " << endl;
cout << "To View Press 2 " << endl;
cout << "Enter Option " << endl;
cin >> y ;
if (y == 1)
{
cout<< "How Many Members Do You Want To Add? " << endl ;
cin >> n ;
Member m[n] ;
for (int i = 0; i < n ; i++)
{
cout << " Enter ID: " << endl ;
cin >> m[i].ID ;
cout << " Enter Name: " << endl ;
cin >> m[i].name ;
cout << " Enter Address: " << endl ;
cin >> m[i].add ;
}
cout << " Member Successfully Added " << endl ;
}
else if (y == 2)
{
cout<< "How Many Members Do You Want To View? " << endl ;
cin >> n ;
Member m[n] ;
for (int i = 0; i < n; i++ )
{
cout<< " Member ID : " <<m[i].ID<< endl;
cout<< " Member Name : " <<m[i].name<< endl;
cout<< " Member Address : " <<m[i].add<< endl;
}
}
else
{
cout << "Invalid" << endl;
}
main_menu();
}
int main ()
{
cout<< " -------------------------WELCOME TO THE CHATGAIYA
CLUB-------------------------" << endl ;
cout << " Chose An Option " << endl ;
main_menu();