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!
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.
Standard in can be re routed.