filebuf* attach( filedesc fd );
Attaches this filebuf object to the open file specified by fd.
Return Value
The function returns NULL when the stream is already attached to a file; otherwise it returns the address of the filebuf object.
Parameter
fd
A file descriptor as returned by a call to the run-time function _open or _sopen. filedesc is a typedef equivalent to int.