for a console application, which would it be best to use fstream or the windows API functions like createfile() and readfile() etc? what are the pro/cons of each?
for a console application, which would it be best to use fstream or the windows API functions like createfile() and readfile() etc? what are the pro/cons of each?
You get more control with the API functions and it allows you to do special file i/o. fstream is miles easier and is cross platform. If you don't want all the hassle of the API functions and you don't need their advanced features, use fstream. There is basically no speed difference.
One is a standardized library which is implemented using the other (on Windows)
Use whatever suits your needs.
gg
thanks for the answers. the advacned feautres would be what? copying, moving deleting files etc?
Have a look at what CreateFile() can do.
gg