and which class shoud I use?
thanks!
what's the difference between wxFile and wxFFile? Topic is solved
for example?
in which case I should use wxFFile? is its performance better?
thanks
thanks
-
- Earned some good credits
- Posts: 109
- Joined: Fri Sep 03, 2004 9:30 am
- Location: Brescia, Italy
Re: for example?
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?
thanks
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