The program has to read a file into an array. after the struct is into an array the user must make up to 8 selections.
I have a void function to make the sections but I don't know how to print out only the selections the user has chosen via a different void function.
Code:void makeSelection(menuItemType[], int noOfItems) { int i = 0; char answer; cout << "You can make up to " << noOfItems << " single order selections." << endl; cout << endl; cout << "Do you want to make a selection? Y/y (yes) or any other key for No: "; cin >> answer; if (answer == 'y' || 'Y') { if (i == i) { cout << "*** This item has already been selected ***" << endl; cout << "Enter item number from Menu: "; cin >> i; cout << "Do you want to make another selection? Y/y (Yes) or any other key for No: "; cin >> answer; cout << "Enter item number from Menu: "; cin >> i; } } else { printCheck (menuList, noOfItems); } } void printCheck (menuItemType menuList[], int noOfItems) { cout << fixed << showpoint << setprecision(2); cout << "Welcome to Smitty's Restaurant"<<endl; cout << "The Cheapest Eats in Town!!!" << endl; cout << "=============================" << endl; cout << "****" << setw(15) << "Menu Items Selected: " << "****" << endl; cout << endl; }



LinkBack URL
About LinkBacks



CornedBee