Program is to append the contents of one file to another, C/C++ Programming

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();

   }

 

 

Posted Date: 10/19/2012 5:33:04 AM | Location : United States







Related Discussions:- Program is to append the contents of one file to another, Assignment Help, Ask Question on Program is to append the contents of one file to another, Get Answer, Expert's Help, Program is to append the contents of one file to another Discussions

Write discussion on Program is to append the contents of one file to another
Your posts are moderated
Related Questions
Write a function that calculates the number of elapsed days between two dates. For example the days between Feb 3, 1970 and June 21, 1980? Becareful for the Leap year.

write a javaprogram to solve padovan string using java? program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring;

flow chart for calculating the volume of sphere

Write a program that finds the minimum total number of shelv, C/C++ Programming



Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b


Write a program to input two integers. If they are equal display "The numbers are equal". Otherwise display a message if the first is a multiple of the second or if it is not a mul

i need a program that find the number of negative integers in a list.