Standard input---Help!

This is a discussion on Standard input---Help! within the C++ Programming forums, part of the General Programming Boards category; Hello all- I am writing a program that reads from standard input. I need to take the first line from ...

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    7

    Exclamation Standard input---Help!

    Hello all-

    I am writing a program that reads from standard input. I need to take the first line from the input and print it out. Then take the second line and print it out, etc. I am stuck on how to take certain characters or strings on a specific line on std input or a file and store it, then print it out. Any help is appreciated!
    Last edited by Salem; 02-07-2011 at 01:12 AM. Reason: Restore original post for context

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    2,700
    What is it you don't understand? You do know that the standard input is the keyboard, right? You do know that cin works with the standard input device, right? You do know that the standard output is your computer monitor, right? You do know that cout works with the standard output, right?

    If the answer to any of the questions above is no, then I suggest you talk with your instructor, teacher's aid, or tutor to explain the standard input and output streams.


    Jim

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    7
    Standard in can be re routed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Printing Length of Input and the Limited Input
    By dnguyen1022 in forum C Programming
    Replies: 33
    Last Post: 11-29-2008, 03:13 PM
  2. Standard Input Trouble
    By c_323_h in forum C++ Programming
    Replies: 4
    Last Post: 07-09-2006, 02:14 PM
  3. large program code ,please help
    By Ash1981 in forum C Programming
    Replies: 14
    Last Post: 01-30-2006, 05:16 AM
  4. Custom Made Safe Input Function
    By Beast() in forum C Programming
    Replies: 6
    Last Post: 08-21-2004, 10:19 PM
  5. need help with some input
    By blindleaf in forum C Programming
    Replies: 2
    Last Post: 03-16-2003, 12:50 PM

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