|
-
January 21st, 2011, 09:44 PM
#6
Scanf expects data of the correct type. If you enter in the wrong data then it fails to work.
Have you tried fgets() (nevermind I just re read the post)
You can try to catch what scanf is returning so if it returns 0 you at least know it failed something along the lines of
Code:
int check = 1;int var = 0;while(check){ check = !scanf("%d", &var);}
fgets(buffer,size,stdin) is your friend - scanf() is not
09:F9:11:02:9D:74:E3:5B  8:41:56:C5:63:56:88:C0
Similar Threads
-
By AngelicKnight in forum General Computer Discussions
Replies: 14
Last Post: June 15th, 2006, 04:04 AM
-
By IcSilk in forum Operating Systems
Replies: 8
Last Post: October 30th, 2005, 11:01 PM
-
By Tedob1 in forum Tech Humor
Replies: 0
Last Post: December 23rd, 2002, 04:58 PM
-
By Rna in forum General Programming Questions
Replies: 4
Last Post: May 22nd, 2002, 07:03 AM
-
By thesecretfire in forum Hardware
Replies: 16
Last Post: May 17th, 2002, 12:31 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|