If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
4 posts • Page 1 of 1
- Earned some good credits
- Posts: 109
- Joined: Fri Sep 03, 2004 9:30 am
- Location: Brescia, Italy
wxFile wraps around "classic unix" i/o style functions, i.e. open(), close(), read(), write() etc.hongxing wrote:in which case I should use wxFFile? is its performance better?
wxFFile wraps around standard C i/o, i.e. fopen(), fclose(), fread(), fwrite() etc.
The standard C functions provide natively buffered i/o, so they *should* be faster than raw i/o, expecially if you are reading/writing small pieces of data (a character at once, for example).
Apart of that, please note that the ::Eof() function behaviour of the two classes is different:
wxFFile::Eof returns true if an attempt has been made to read past the end of the file;
wxFile::Eof returns true if the end of the file has been reached (before reading past the end).
Sandro Sigala - Kynosoft, Brescia