Saving a file

This is a discussion on Saving a file within the Game Programming forums, part of the General Programming Boards category; How do you make a C program save a file that it can access later even after restarting the program ...

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    11

    Saving a file

    How do you make a C program save a file that it can access later even after restarting the program?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,848
    Save
    fopen + fprintf
    Load
    fopen + fscanf


    or

    Save
    fopen + fwrite
    Load
    fopen + fread

    Go look them up in your manual pages (or on the interwebs)
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Jan 2012
    Posts
    11
    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Saving a file
    By TyPR124 in forum C++ Programming
    Replies: 10
    Last Post: 12-01-2007, 04:26 PM
  2. Saving to a file
    By HLA91 in forum C++ Programming
    Replies: 2
    Last Post: 11-28-2007, 12:09 PM
  3. Saving to a file!
    By MrMe913 in forum C Programming
    Replies: 4
    Last Post: 04-23-2007, 10:54 AM
  4. Saving to a .txt file
    By adr in forum C++ Programming
    Replies: 1
    Last Post: 04-23-2006, 03:14 AM
  5. saving to a file
    By 182 in forum C++ Programming
    Replies: 6
    Last Post: 03-25-2006, 02:41 PM

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