Home » questions » How can I read an entire text file to a buffer?
How can I read an entire text file to a buffer?
Using Win32 functions CreateFile and ReadFile. I don't want to specify a static size for the char [ ] buffer as it will depend on the size of the file. I need a buffer I can pour the entire file into. If somebody can point me to a sample, then that would help.
Cheers

Answers
Titus W
On 2006-08-14 16:06:24
timespiral
On 2006-08-14 16:22:55