Ramnarayan
Programmer
Hi,
I have a unique situation. WHen I open a txt file, I know that the end of the file has to have a closing tag. So that means when I read the file, I want to automatically go to the end of the line and put the tag as below:
Line 1: this is a
Line 2: test file and
Line 3: has many lines
Line 4: ending with the last line.
Now when I open this file, I want to be able to jump to line number 4 or the last line of any file, and put the tag </text> by default. How can I accomplish this using File I/O? Note that the input file can have any number of lines. But always the last line should be picked out and at the end of this line has to have a tag </text> as below:
Line 4: ending with the last line. </text>.
As usual, thanks for your quick responses.
I have a unique situation. WHen I open a txt file, I know that the end of the file has to have a closing tag. So that means when I read the file, I want to automatically go to the end of the line and put the tag as below:
Line 1: this is a
Line 2: test file and
Line 3: has many lines
Line 4: ending with the last line.
Now when I open this file, I want to be able to jump to line number 4 or the last line of any file, and put the tag </text> by default. How can I accomplish this using File I/O? Note that the input file can have any number of lines. But always the last line should be picked out and at the end of this line has to have a tag </text> as below:
Line 4: ending with the last line. </text>.
As usual, thanks for your quick responses.