Hi,

I wish to do the following things:

a) Append the first three lines from the file "file1.txt" at the end of another file "file2.txt"
b) Run a program "prog1.cpp" which uses the file file2.txt.
c) Delete the three lines appended at the end of the file "file2.txt". and append next three lines from the file "file1.txt" to file "file2.txt".
d) Run the program "prog1.cpp" which uses the changed file file2.txt".

I need to do the above steps again and again.

I do not how to implement it. Please guide me with how to proceed.

Thanks,

Recommended Answers

All 4 Replies

Start here.

When you hit the wall post your code and we'll help further.

yeah ... i'm just not seeing where the "Urgency" is here

i thought someone was bleeding on the floor.

commented: Indeed. +16

yeah.... if u cannot help i suggest do not post such remarks "i thought someone was bleeding on the floor.".

guest7, you've already made several unseemly blunders, but now you are risking being completely ignored.

Please read up before becoming belligerent.
How To Ask Questions The Smart Way

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.