Advertisement

VC++ and File Loading

Started by May 27, 2001 03:48 PM
3 comments, last by Prozak 23 years, 8 months ago
Hi all, Many people new to VC++ reach a point were they must ask this question: What is the easiest method of implementing File Handling? Open a file, read a stream of cha/bytes, save, create, delete, truncate, etc... In my case, i would like to open, read a stream of bytes to a buffer, and save that buffer to a 2nd file. Seems possible, I bet it is ! Thanks all, Hugo Ferreira lotsjunk@hotmail.com http://unitek3000.tripod.com
You have your choice of Win32 functions, MFC Data/View architecture, C++ streams, and/or C file operations. I use C++ streams myself. A good reference book on C++ should cover how do do file input/output.
Advertisement
Look up fopen, fclose, fputc and fgetc in the MSDN. You should be able to figure it out from there. It''s very straightforward.


Todd M. Gillissie
Todd M. GillissieGilligames
Thanks,

that last reply was much more helpfull.

Thanks.



Hugo Ferreira
lotsjunk@hotmail.com
http://unitek3000.tripod.com
careful !!! ..

standard io is kinda buggy on windows if used at high volume..

use

CreateFile()
ReadFile()
WriteFile()
CloseFile()
SetFilePointer()

instead ..

{ Stating the obvious never helped any situation !! }

This topic is closed to new replies.

Advertisement