hey guys, i have a program where a certain amount of data is stored in a buffer, starting at the location pointed to by buffer.start and continuing on for buffer.length bytes. is there a function that will take care of transferring all of this information into a file for me, or will i have to do some fancy maneuvering? thanks! much appreciated-
thanks kbw- one problem i am having though. i need to output this to a file, not a device. it asks for a filedescriptor, an int. what would be great is if i could do something like this:
In C, there two kinds of I/O. There's the OS open/read/write/close which are unbuffered and ANSI fopen/fread/fwrite/fclose which are.
If you're using fopen, you need to use fwrite. This is the more portable way.
C environments will provide open/read ..., and they're native on Unix, but not necessarily elsewhere. For example, Windows has CreateFile/ReadFile/WriteFile/CloseHandle.