Thread: Reading input buffer

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    98

    Reading input buffer

    **answered**

    Say a user inputs

    Waffle House 3040

    on a single line. How can I read those separately? say I want to put Waffle in its own char and House in its own char and 3040 in an int.

    I don't fully understand the innerworkings of cin//cout yet so it could be simple... Right now all I can think of is looping into an array, and stopping at white space.

    [edit] - Nevermind I didn't intialize my chars right... I got it now.
    Last edited by Sparrowhawk; 02-23-2009 at 04:20 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading a buffer line by line, while using system read
    By Hammad Saleem in forum C Programming
    Replies: 9
    Last Post: 05-27-2008, 05:41 AM
  2. Flush Input Buffer
    By zx-1 in forum C Programming
    Replies: 41
    Last Post: 10-29-2005, 08:58 AM
  3. Quick C Question - checking buffer for input
    By sean in forum C Programming
    Replies: 3
    Last Post: 11-13-2004, 12:23 PM
  4. reading an input line using scanf() with %c
    By linucksrox in forum C Programming
    Replies: 6
    Last Post: 04-04-2004, 03:10 PM
  5. reading a columns input data file
    By vk13wp in forum C Programming
    Replies: 6
    Last Post: 04-28-2003, 01:32 PM