validation

closed account (2Lyv0pDG)
i have a problem i have to write a program that calculate the sum,average and tripple of integers i understand that part. However i must validate my code in such a way that i could only enter an integer and if i were to enter a character I would get an error is there a function i can use to validate my code.
Do you mean something like this: http://www.cplusplus.com/forum/articles/6046/ ?
Please consider reading the following posts from OP before replying here. OP is clearly looking to have the code written for him/her.

http://www.cplusplus.com/forum/unices/6252/
http://www.cplusplus.com/forum/unices/6243/
Ohoho! That's a killer!
I never read OP's names, so I wouldn't have noticed if you hadn't said anything.
Topic archived. No new replies allowed.