Menu

saving and printing info

2002-12-25
2012-09-26
  • Nobody/Anonymous

    What is the best or easiest way to save data in C++ and printing?? I.E. a checkbook balance where I want to keep a rolling track of last balance calculated instead of using a cin to enter it everytime??
    Thanks!!

     
    • Nobody/Anonymous

      Best way if probably through a data file.  This is one of those cases in life where you can use either the C or the C++ method for file input / output.  In the C++ method, you will create an object of either the ifstream class or the ofstream class, depending on whether you are doing input or output.  I don't have a good example on this puter right now, let me see what I can hunt up, or someone will hop in with one of theirs.

      Wayne

       
    • Nobody/Anonymous

      Herea a good link on file i/o:

      http://www.ibiblio.org/obp/thinkCScpp/chap23.htm

      Wayne

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.