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
In this lab, please complete a given program to perform the following tasks: 1. Allocate a 10 by 5 2D byte array dynamically. The way of allocation must be consistent with pag

Change the matrix program (program 3) slightly. Overload == operator to compare two matrices to be added or subtracted. i.e., whether the column of first and the row of second

Project Description: I want a person who will be able to program a flex PCB for my device as i meet the person i will be able to describe all my needs Skills required are C P

The Malt Shop restaurant charges $2.99 for burgers, $1.29 for fries, and $1.25 for sodas.  Write a program that allows a restaurant employee to enter an order (the number of bur

C Program for FUNCTION  OF COMPOUND INTEREST float ci(float,float,float); void main() {           float p=0,r=0,n=0,k=0;           clrscr();           printf("EN

Prepare an iPad application Clash of Clans like game I would like to prepare a free city building app with the in app purchase possibility. An example game could be Clash of Cla

Write a C++ program with header and source files to store street addresses using the Doubly Linked List ADT. Modify the Node class from Lab Assignment 3 so that it becomes a node i

You are working for a computer gaming company and have been asked to look at a survival game.  You will be simulating a rabbit stranded on an island, collecting a large number of s

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Write a c++ program that contain the following functions : 1) Function Quality_Point that takes one int argument (student_average) and return ‘A’ if the student_average between 90-