If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Good. That said, you really want to replace the outdated
#include<fstream.h>
#include<iostream.h>
with
#include<fstream>
#include<iostream>
though. Also, main should return int, not void. The code as-is might not compile with new compilers unless fixed.

I have correted almost.
Please correct the error in my program. When i run the program on turbo c++ 3, it output 3 times. Also When i enter more than 1 entry only the last entry is outputted. Also it is outputted 3 times.

Thank you very much for taking time. I am from India and here we learn about only basics of c++ and our syllabus is based on turbo c++ 3. So i use turbo c++ and i don't know much about c++ programing. So i cannot implement instructions you give on modern c++.

I tried new changes. But i still have some little problems. The program is to transfer content of one file to another. When i input only one entry, the program works. But when more than one entry is used it out puts only 1 or 2. Kindly please correct the problem.

You need to check the status of every file operation: make sure that the open() call has succeeded before you move on to write() or read().
Also, make sure that you open the file in binary mode. Also decide whether you want to always to overwrite the current file content with write() or whether you wish to append new data after existing data (use ios::ate for that).
Finally, as said earlier, you need to change the type of ch to a char array because pressing 'y' and then Enter write two characters, not one, to the standard input, which is probably why you're getting erratic program behavior.