Hi,
Its a newbie Q!!please help........
I want to check if the integers entered are only numbers ,not strings/characters.
I know isdigit function but i suppose its in character-handled library,but I am using class string.So is there any function for checking that input values are only integers not character/strings/symbols etc;
thanks



LinkBack URL
About LinkBacks





.
as for what they do.
the cin.fail() condition checks and returns a value, that is if the input was anything other than a number cin.fail() would return true (which is the condition for entering a loop).