Menu driven program that allows user to maintain a collection of integer values through the following menu options

closed account (L10oLyTq)
(P)rint should print the collection
(A)should prompt the user for the value to add to collection (duplication not allowed),
(D) Delete value from collection( if present)
(C) should simply empty the collection and finally
(Q) should cause the program to terminate

Im a beginner and im finding this extremely hard i seriously need help this is all i have got so far


#include <iostream>

using namespace std;

int main()
{
int choice;
bool Menuon=true;
while (Menuon !=false){


do
{
cout << endl
<< " 1 - Print.\n"
<< " 2 - Add.\n"
<< " 3 - Delete.\n"
<< " 4 - Clear.\n"
<< " 5 - Quit.\n"
<< " Enter your choice and press return: ";
cin >> choice;

switch (choice)
{
case 1:
{


cout<< "collection printed";
cout<< i;
//Print collection


break;
case 2:
{
int i;
cout << "Please enter an integer value: ";
cin >> i;
cout << "The value you entered is " << i;
return 0;
}
//should prompt the user to add collection
break;
case 3:
//should prompt user for the value then delete it from the collection
break;
case 4:
//should empty the collection
break;
case 5:

cout << "End of Program.\n";
break;
default:
cout << "Not a Valid Choice. \n"
<< "Choose again.\n";
break;
}
}while (choice !=5);
return 0;
}
}
http://www.cplusplus.com/forum/beginner/194710/
TheIdeasMan wrote:
Just a note for the future :+)

There also shouldn't be 2 topics about essentially the same subject. There is a risk that the same things will be said in both, possibly making it a time waster for those who reply.
Topic archived. No new replies allowed.