Please remain polite, Mr. ToniAz was only trying to help and he made some good points.
First off, I would replace
the former are C functions, the latter are C++ objects and are thus preferred.
So, you have displayed your menu, that's a start.
I'm just going to focus on that for now, we'll do the rest from the ground up so you understand what we're doing.
So, after some modification,this is what we have so far:
# define MAX 50 //max array size
std::cout << "MENU\n\n";
std::cout <<"F.Fill\nP. Print\nS. Sort\nQ. Query\nZ. Terminate\n";
std::cout <<"Please enter the option you selected: ";
Now we have to evaulate the user's choice, which is now stored in char.
This is best done using a switch-statement ( http://cplusplus.com/doc/tutorial/control/#switch
) like so:
//do Filling here
//do printing here
//do querying here
default: //if choice was none of the above
std::cout << "\nInvalid input - please try again.";
//show the menu again
The best way to continue from that is to start with making a separate function that will fill an array, which is then called like so in the switch statement:
So, try and put that switch statement in the main function above and writing that fill function.
Once it is filled we can print and query it, so that's half the work done.
On a sidenote, defining TRUE and FALSE is really unnecessary, you can just use
in your code.
All the best,