Kenny said:
ok here is the code
cout << " Your choice please: ";
cin >> choice;
if (isnumeric(choice) == true){
OK.
And what is the problem with this code?
Note: isnumeric() isn't one of the standard functions
So you must have written it by yourself. What this
function exactly has to look like is dependent on the
data type of choice.
So what is choice?
Where is the implementation of isnumeric()?
and last but not least: Which error message did you
get from your compiler.
Could it be that you wanted isdigit() instead of isnumeric()
(Note: isdigit() checks a *single* character if it represents
a numerical digit, not a whole string. But using this function
it is easy to write a function isNumeric which does the whole
thing on a complete string).
I know all of this may sound childish to you. But remember:
*You* sit in front of your computer. *You* write the program.
*You* see the error messages from your compiler. If we try
to help you, we can only use what *you* tell us. If you
call your doctor and cry: "Help" I am sure your doctor would
do the very same: Ask for details. If you are a good patient
you wouldn't let your doctor ask you for everything but provide
him with all you know about your problem in the first place.
We *want* to help you, that's why we are here and answer questions.
But we also expect people seeking for help to coorporate.