prevent char input from int

This is a discussion on prevent char input from int within the C Programming forums, part of the General Programming Boards category; Hi If there is while loop to ask user to input a integer at a time, how to prevent from ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    173

    prevent char input from int

    Hi
    If there is while loop to ask user to input a integer at a time, how to prevent from input by and char or string or any decimal numbers? and how to quit the while loop if user only push the "enter" key without any input?

    Thanks.
    Don't laugh at me,I am just a SuperNewbie.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Well, you could always read the FAQ.

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to combine these working parts??
    By transgalactic2 in forum C Programming
    Replies: 0
    Last Post: 02-01-2009, 08:19 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  3. Replies: 1
    Last Post: 10-27-2006, 02:21 PM
  4. Replies: 14
    Last Post: 06-28-2006, 02:58 AM
  5. How do you search & sort an array?
    By sketchit in forum C Programming
    Replies: 30
    Last Post: 11-03-2001, 05:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21