Can I save a variable in a new file?

This is a discussion on Can I save a variable in a new file? within the C++ Programming forums, part of the General Programming Boards category; I would like to know how to save a variable in a separate file so that the information can be ...

  1. #1
    Unregistered
    Guest

    Can I save a variable in a new file?

    I would like to know how to save a variable in a separate file so that the information can be retrieved when the program is shut down... Please give me a hand if you can...

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    check out fstream (located in fstream.h). I'm sorry, but I haven't learned the exact syntax. I'm still using file pointers (good ol' C)
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM

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