D
Denis Remezov
Woodster said:I would have put it in a Windows or CE group however I am trying to get
my file handling routines platform independent. The dynamic_cast and
STL stuff I have pretty much got sorted out so far. it is just the file
handling that I need to organise. As far as I can tell, the open and
close functions are MS only so I am trying to get a FILE * out of an int
file handle that I can pass to my generic code.
Regards
Woodster
FILE*-based API (the corresponding header file is stdio.h) is a part of
the standard I/O library as defined by ANSI C. C++ has inherited it, so
it is standard C++. It is neither the most efficient nor the most
convenient of the options, but it is very portable.
Beware: not everything that may be found in stdio.h is standard C++ (or C).
One example is the curious int fileno(FILE*).
File I/O based on open, close and so on is not defined in the standard
C++ or C. It is a part of POSIX though (not MS), so it has good portability
too. There is no standard way to "convert" between the two APIs.
Denis