Thread: apending data to a file

  1. #1
    BEEP BEEP
    Guest

    apending data to a file

    whats the syntax to append data of one file to another file.

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Use fopen() to open the files. Open the source-file for reading only and open the destination-file for appending. Then use for example fwrite() or some other file-writing function to write the data from the source-file to the destination-file. You could use fread() for reading. And finally close the files using fclose().

    Take a look here for more detailed info:
    http://www.acm.uiuc.edu/webmonkeys/book/c_guide/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. Bitmasking Problem
    By mike_g in forum C++ Programming
    Replies: 13
    Last Post: 11-08-2007, 12:24 AM
  3. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. File Database & Data Structure :: C++
    By kuphryn in forum C++ Programming
    Replies: 0
    Last Post: 02-24-2002, 11:47 AM