apending data to a file

This is a discussion on apending data to a file within the C Programming forums, part of the General Programming Boards category; whats the syntax to append data of one file to another 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,386
    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, 04:44 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM
  5. File Database & Data Structure :: C++
    By kuphryn in forum C++ Programming
    Replies: 0
    Last Post: 02-24-2002, 11:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21