Thread: New to C++ - regarding files...

  1. #1
    Registered User Inept Pig's Avatar
    Join Date
    Apr 2002
    Posts
    140

    New to C++ - regarding files...

    I've just started learning C++ recently and was wondering if it has an equivelent of the C commands - fseek, fread, fwrite?



    Or can I use these commands and still consider it to be C++?

  2. #2
    Registered User
    Join Date
    Jul 2002
    Posts
    273
    look at the fstream objects. they wrap up most of that stuff

    ifstream = input file
    ofstream = output file
    always looking, make an offer. get me out of this place.

  3. #3
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    You can still use those functions as well. Just include cstdio and use namespace std.

  4. #4
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    if u use the c++ way u need to #include <fstream>
    Email: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  5. #5
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    fstream::read()
    fstream::seekg()
    fstream::tellg()

    You get the idea.

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, 06:50 AM
  2. add source files to embedded VC 4.0
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 03:28 AM
  3. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 04: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