Thread: wxFile problem
View Single Post
Old Aug 25th, 2007, 7:24 AM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Absolutely. If you only give a single value to the constructor, without casting, it will be interpreted as a file descriptor. If you add the second argument, open mode, the first argument will be interpreted as a const char * without the cast.

As dr.p says, a visit to the documentation is in order.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote