how would i remove the first line in a txt file

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
Hello
bye
what
you

after the program the file would read

bye
what
you

Last edited on
closed account (j3Rz8vqX)
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.

Done.

http://www.cplusplus.com/doc/tutorial/files/
Ensure to write out with the ios::trunc option.
Topic archived. No new replies allowed.