|
-
January 17th, 2011, 08:06 PM
#2
A quick google search should help... here are some links that should help you understand what is going on:
http://www.velocityreviews.com/forum...ith-scanf.html
http://c-faq.com/stdio/scanfjam.html
For the reasons mentioned above I prefer to use gets(), or just read() from stdin and check the input, and convert to an integer (if needed) with atoi(), instead of relying on scanf(). It is more work but gives some nicer control over what you can decide to do with the input.
Good luck.
Last edited by ABS; January 17th, 2011 at 08:08 PM.
Reason: Fixed bad link tags
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
|
|