Hello I'm back guys! @npcomplete....can't do anything about it dude, its what we use in our school...and Im from the Philippines...when I master this compiler, i'll switch..
So here it is my work so far...Record of 100 Buyers..Please check if I did it right..It worked for me so..yea..
#include<iostream.h>
#include<cstring.h>
#include<conio.h>
struct BuyerInfo
{
int id;
string fn;
string mn;
string ln;
string ad;
}
info[100];
void menu()
{int i=0;
cout<< "\n================================================================================";
cout<< "\t\t\n WELCOME BUYER!Please fill in the following\n";
cout<< "\n================================================================================";
for(i=0; i<1; i++)
{
cout<< "\nBuyer's ID:B";
cin>>info[i].id;
cout<< "Enter First Name:";
getline(cin,info[i].fn);
cout<< "Enter Middle Name:";
getline(cin,info[i].mn);
cout<< "Enter Last Name:";
getline(cin,info[i].ln);
cout<< "Enter Address:";
getline(cin,info[i].ad);
}
clrscr();
cout<<"\n----------Data---------\n";
for(i=0; i<1; i++)
{
cout<< "\nBuyer's ID:B"<<info[i].id;
cout<< "\nFirst Name:"<<info[i].fn;
cout<< "\nMiddle Name:"<<info[i].mn;
cout<< "\nLast Name:"<<info[i].ln;
cout<< "\nAdress:"<<info[i].ad;
}
}
void main()
{
char ans;
int buyid;
struct BuyerInfo info[100];
cout<< "\n================================================================================";
cout<< "\t\t Welcome to the Black order Grocery system\n";
cout<< "\n================================================================================";
cout<< "\nPlease choose from the following:";
cout<< "\n[A]New user";
cout<< "\n[B]Already a member";
cout<< "\n================================================================================";
cout<< "Answer:";cin>>ans;
clrscr();
if(ans=='A'||ans=='a')
{
menu();
}
else
cout<<"Please Enter BuyerID:";
cin>>buyid;
}
How is it?...
Question: Now i'll go ahead and make the scan Buyer's items..any suggestions?