I have to create a switch statement that calls a statement when one of the choices is selected. i.e.
My question is, what should I have the function return, since when the choice is made, it calls a function.
Code:
cout << "Please select a choice from the menu below: " << endl;
cout << "F)ind a word by index" << endl;
cout << "S)earch for a word" << endl;
cout << "O)utput the number of words" << endl;
cout << "E)xit"<< endl;
cin >> choice;
while(choice != 'E' || 'e')
{
switch (choice)
{
case 'F' || 'f': cout << readWords(wordList, nWords);
break;
}
My question is, what should I have the function return, since when the choice is made, it calls a function.
Comment