Trim a line

Very, very new to C++ and I have my first project.

I have a file that I need to read in, and cut off any line over 1000 characters at 1000 characters and output that line as it was (at 1000 lines).

any help appreciated. I have done the search and not found anything here (or google) exactly to help me achieve this.

-bighead
Do you know how to read a line and print it?
Really? Nothing Here? http://www.cplusplus.com/reference/iostream/istream/get/

I could see where you might get confused though. I'm confused about that last bit in your second paragraph,
(at 1000 lines).
are we looking for 1000 chars? Or do we want 1000 lines? Because they would each use different commands.
Topic archived. No new replies allowed.