wxFFileOutputStream usage under GTK
Vadim Zeitlin
vadim at wxwidgets.org
Wed Apr 2 14:28:23 PDT 2008
On Wed, 2 Apr 2008 16:19:22 -0400 (EDT) Igor Korot <ikorot at earthlink.net> wrote:
IK> Hi, ALL,
IK> Consider the following code snippet:
IK>
IK> class MyClass
IK> {
IK> public:
IK> MyClass();
IK> ~MyClass();
IK> #if wxUSE_STD_IOSTREAM
IK> wxSTD ostream& SaveObject(wxSTD ostream& text_stream);
IK> wxSTD istream& LoadObject(wxSTD istream& text_stream);
IK> #else
IK> wxOutputStream& SaveObject(wxOutputStream& stream);
IK> wxInputStream& LoadObject(wxInputStream& stream);
IK> #endif
IK>
IK> private:
IK> // Some member data
IK> };
IK>
IK> void MyFrame::ProcessAndSaveObject()
IK> {
IK> MyClass A;
IK> // some processing
IK> wxFFileOutputStream stream( fileName );
IK> A.SaveObject( stream );
IK> }
IK>
IK> This code compiles and works on wxMSW. However it fails to
IK> compile on wxGTK-2.8, saying that there is no function to
IK> call for A.SaveObject(wxFFileOutputStream).
IK>
IK> What do I need in order to compile this code across platform?
Either build wxGTK without wxUSE_STD_IOSTREAM or write your code without
this #if -- why did you add it?
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list