I want to rewrite the \"cp\" command of Linux. So this program will work like #./a.out originalfile copiedfile. I can open the file, create new file but can\'t writ
#./a.out originalfile copiedfile
You have to do write in the same loop as read.
write
read