-
file io problem
hey everyone
i have a file with several lines. then there is a line saying "i am me". then again there are several lines what i want to do is i want to remove the line "i am me". after removing, all the lines after it have to be shifted up. what i mean is
test
test
test
test
i am me
test
test
test
has to be replaced with
test
test
test
test
test
test
test
please help! google isnt turning up anything concrete that i can understand!
-
Just read the file line by line (using Scanner) and check whether it is equal to "i am me"... if it is not then print it in another temporary file else proceed to next line... :(y):
-
thanks man! that never occurred to me :)-:
-
-
Quote:
Originally Posted by
Hamza Aldabbas
just make strcmp
This is a Java forum not a C forum.