View Single Post
  #1 (permalink)  
Old April 25th, 2008, 12:38 PM
code_lover code_lover is offline
Authorized User
 
Join Date: Jan 2007
Posts: 46
Thanks: 2
Thanked 1 Time in 1 Post
Default Validation in C++

I want to do validation. I need to make sure that input is an integer. What is the function in C++ that determines that the given input is an integer. And if the input is not an integer then the cin>> statement remains there.
Plz guide me with a piece of code eg. lets say the user has to enter his age or marks obtained in a subject.

MAXOOD!

Life is an endless journey towards perfection
__________________
MAXOOD!

Life is an endless journey towards perfection
Reply With Quote