Thread: Append to a file

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Append to a file

    I have searched MSDN and Google, but I still don't know how to append text to a file in Win32. So I have decided to come here, any one know how to do it? Thanks, August.

  2. #2

  3. #3
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    why not use C file manipulation in your Win32 app?
    Code:
    FILE *fileptr;
    char filename[13] = "filename.ext";
    
    fileptr = fopen(filename, "a");
    ...
    fclose(fileptr);
    Registered Linux User #380033. Be counted: http://counter.li.org

  4. #4
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    I'm sorry, but I don't get what willc0de4food is saying.

  5. #5
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    i'm saying that you don't need to use any win32 api functions, you can append to a file using ones declared in the stdio.h header.
    read

    Registered Linux User #380033. Be counted: http://counter.li.org

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  2. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  3. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM
  4. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM