how would i remove the first line in a t
how would i remove the first line in a txt file
May 31, 2014 at 7:01pm UTC
Alright i have a txt file and i am making a program to open it and read from it but is their a way to make a section that will delete the top line in the file
so if the txt file containted
after the program the file would read
Last edited on
May 31, 2014 at 7:02pm UTC
May 31, 2014 at 7:25pm UTC
closed account (
Open file for reading.
Read the data into your array of strings.
Close reading file.
Modify the first string in the array @ index 0 to be ""; null.
Open file for writing.
Write your data into file; truncating.
Close write file.
Ensure to write out with the
Topic archived. No new replies allowed.
General C++ Programming
© cplusplus.com, 2000-2015 - All rights reserved -
Spotted an error? contact us