C++ files

This is a discussion on C++ files within the C++ Programming forums, part of the General Programming Boards category; I'm learning c++ myself out of a c++ book but when i got to the file and data storage chapter ...

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    11

    C++ files

    I'm learning c++ myself out of a c++ book but when i got to the file and data storage chapter i got completely lost. The book does not give a very good explanation of the whole fstream, ifstream, operators and how to actually save info that was input into a c++ program. Does anyone know of any online source that would help me learn how to properly use these things. Thanks

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Which book? Have you tried Thinking in C++?

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    11
    Its practical c++ programming. And so far its been a great book for learners. thanks ill take a look at that new one

  4. #4
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Take a look at the cprogramming.com tutorial and the cplusplus.com tutorial. That won't show you everything, but it should get you started.

    ...how to actually save info that was input into a c++ program.
    I assume your book shows you how to read/write text? And, I assume that you've already got this "info" stored in variables? If you want to save more complicated "data".... something like a database, that may be covered in a more-advanced chapter.

    I don't know anything about Practical C++ Programming, but most beginning C++ books should have a chapter or two on file I/0 and several examples. You can search the Net for tutorials and examples. But, most tutorials are very abbreviated so you may have to search several websites to find "the answer". And, you may want to look for another book... Sometimes you need more than one book (and the Net) when you're "teaching yourself".

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ressources files
    By mikahell in forum Windows Programming
    Replies: 4
    Last Post: 06-19-2006, 07:50 AM
  2. add source files to embedded VC 4.0
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 04:28 AM
  3. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 05:45 AM
  4. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  5. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM

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