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++?
This is a discussion on New to C++ - regarding files... within the C++ Programming forums, part of the General Programming Boards category; I've just started learning C++ recently and was wondering if it has an equivelent of the C commands - fseek, ...
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++?
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.
You can still use those functions as well. Just include cstdio and use namespace std.
if u use the c++ way u need to #include <fstream>
Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com
-the shroom has spoken
fstream::read()
fstream::seekg()
fstream::tellg()
You get the idea.