i have a program that would display the productName,productPrice,productCode.
each is a separate array.
the program would prompt user to add,delete,or search a productName,productPrice,productCode.
here's what i tried to do:
string productName[100]={"milk","beef"};
int productPrice[100]={10,11};
string productCode[100]={"a1","a2"};
int x,y,z;
char choice;
string search,name,price,code;
cout<<"what do you want to do?";
<<"[S]earch.";
<<"[A]dd.";
<<"[D]elete.";
cin>>choice;
if (choice=="s"||choice=="S")
{
cout<<"enter product name: ";
cin>>search;
for(x=0,x<2,x++)
{
cout>>productName[x];
}
}
if (choice=="a"||choice=="A")
{
cout<<"enter product details: ";
cin>>name>>price>>code;
// i dont know the code here (add)
}
if (choice=="d"||choice="D")
{
cout<<"enter product name: ";
cin>>name;
//i dont know the code here (delete)
}
i appreciate any help.