Friday, February 19, 2010

DOS file handle

Q: How can I get at the DOS file handle associated with my iostream?

A: Using a combination of member functions fd() and rdbuf() you can

get at the file handle.

#include

#define fstrno(s) (((s).rdbuf())->fd())

ifstream test("test.txt");

cout << "handle is " <<>

No comments:

Post a Comment