R
ricky
I am a student doing internship. Iam doing a project.
I need to remove or update a line in the file.
So far
1.I can read from file
2. I can write to the file
3. I can find the string in the file i want to delete
Now,I want to take the input from one file and write all the infomation
to the new file except the one i don't want.
I can take the infrmation frm one file and write it to the new file and
delete the old file.
The only and imp bit i can't figure out is how to write all the
information except the one i dnt want
Would be something like
strncmp()
if(found)
here i want to write something that if found dnt write to new file
else
file<<all the lines;
Please help!!
I need to remove or update a line in the file.
So far
1.I can read from file
2. I can write to the file
3. I can find the string in the file i want to delete
Now,I want to take the input from one file and write all the infomation
to the new file except the one i don't want.
I can take the infrmation frm one file and write it to the new file and
delete the old file.
The only and imp bit i can't figure out is how to write all the
information except the one i dnt want
Would be something like
strncmp()
if(found)
here i want to write something that if found dnt write to new file
else
file<<all the lines;
Please help!!