Thread: Saving a file

  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
    39,659
    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.

  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, 09:54 AM
  4. Saving to a .txt file
    By adr in forum C++ Programming
    Replies: 1
    Last Post: 04-23-2006, 02:14 AM
  5. saving to a file
    By 182 in forum C++ Programming
    Replies: 6
    Last Post: 03-25-2006, 02:41 PM