Pretty simple problem here i rekon, but I cant figure it out =0
if i promt the user for an integer with something like:
how can I make certain that an integer is input, and not a char, string, double etc. My problem is that in my program, if some1 enters a character then it crashes - going into an infinite loop. Any ideas ?Code:printf("please input an integer"); scanf("%d", &intOpt1);![]()


LinkBack URL
About LinkBacks
Reply With Quote
(for noobs like me).
