When I copying the content of file Source.txt, which include only the word "Life", to another file Target.txt. It only copy the "EI" not "Life".why? The following
Blockquote
is the code that i tried. is another way to copy one file content to another file. and also explain the following why it's happen? Thanks in advance. Great Confusion.
Source File include the following text: Life Copied Files from Source File is: EI
char ch;
ifstream source("Source.txt");
ofstream target("Target.txt");
while(source.eof()==false)
{
source.get(ch);
target<<ch