wxFFileOutputStream usage under GTK

Igor Korot ikorot at earthlink.net
Wed Apr 2 13:19:22 PDT 2008


Hi, ALL,
Consider the following code snippet:

class MyClass
{
public:
    MyClass();
    ~MyClass();
#if wxUSE_STD_IOSTREAM
  wxSTD ostream& SaveObject(wxSTD ostream& text_stream);
  wxSTD istream& LoadObject(wxSTD istream& text_stream);
#else
  wxOutputStream& SaveObject(wxOutputStream& stream);
  wxInputStream& LoadObject(wxInputStream& stream);
#endif

private:
// Some member data
};

void MyFrame::ProcessAndSaveObject()
{
   MyClass A;
   // some processing
   wxFFileOutputStream stream( fileName );
   A.SaveObject( stream );
}

This code compiles and works on wxMSW. However it fails to
compile on wxGTK-2.8, saying that there is no function to
call for A.SaveObject(wxFFileOutputStream).

What do I need in order to compile this code across platform?

Thank you.


More information about the wx-users mailing list