cout << ">Please enter a letter: \n>";
What i am trying to work out is how to restrict the user for only entering one letter - has to use a string due to being used in a function later which only takes a string .... i know i hate to say this on here but help ( have tried googling) :D
First thing you need to decide is what happens if 2 or more characters are entered? If this is not a concern, just use cin.get() . Keep in mind all the extra characters will be waiting for the next input. That can mess the user input up royally.
If it is a concern and you only want the first character, read the entire line into a temporary string and move the character into the input string.
Third option is jonsca's suggestion.
Thank you all for your reply's
@jonsca - Unfortunately i did not write the function and cannot change it
@L7Sqr - I cannot use String.
@waltp - jonsca method works as i can just return false if more than one input is entered.