Thread: Validade input for integers, but a space is messing it up

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Registered User FernandoBasso's Avatar
    Join Date
    Oct 2011
    Location
    Brazil
    Posts
    45
    std10093, that was an improvement. Thanks. But, try hitting <Tab> several times before <Enter>.
    I just see empty new lines, and no messages any more.


    EDIT:
    Oh, I just added || c == '\t':

    Code:
    // ....
        } while ( c == ' ' || c == '\n' || c == '\t'); // If it is an enter or whitespace or tab, eat them.
    Last edited by FernandoBasso; 08-04-2012 at 09:35 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 10-29-2011, 07:02 PM
  2. space between input
    By dNNNY in forum C Programming
    Replies: 8
    Last Post: 07-15-2008, 12:52 PM
  3. EOF messing up my input stream?
    By Decrypt in forum C++ Programming
    Replies: 4
    Last Post: 09-30-2005, 03:00 PM
  4. Messing with Large Integers
    By johnnie2 in forum Windows Programming
    Replies: 3
    Last Post: 11-16-2002, 01:22 PM
  5. Reading integers until end of input
    By nivo in forum C Programming
    Replies: 7
    Last Post: 10-20-2001, 04:18 PM