program is to append the contents of one file to


Program is to append the contents of one file to another:

void main()

   {

  clrscr();

  fstream file1,file2;

  char st1[13],st2[13];/* 13 because a filename cannot have more than name

  of 8 charecters and 3 for extention and 1 for null value*/

  cout<<" input the source filename ";

  cin>>st1;

  cout<<" enter the target file name ";

  cin>>st2;

  file1.open(st1,ios::in);

  file2.open(st2,ios::out|ios::app);

  char ch;

  while(file1)

    {

    file1.get(ch);

    file2<

    }

  file1.close();

  file2.close();

   }

 

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: program is to append the contents of one file to
Reference No:- TGS0174906

Expected delivery within 24 Hours