IMPLEMENT_DYNAMIC_CLASS compile error

W. C. Bubel inmatarian at gmail.com
Thu Jul 5 15:41:18 PDT 2007


I'm testing out the Document/View framework and keep getting this error:
src/main.cpp:172: error: expected constructor, destructor, or type
conversion before ';' token

The related code looks like so:

class MyDocument : public wxDocument
{
  DECLARE_DYNAMIC_CLASS(MyDocument);
  public:
    MyDocument(void) {};
    ~MyDocument(void) {};
    virtual bool OnSaveDocument(const wxString& filename);
    virtual bool OnOpenDocument(const wxString& filename);
    virtual bool IsModified(void) const;
    virtual void Modify(bool mod);
  private:
};

IMPLEMEMT_DYNAMIC_CLASS(MyDocument, wxDocument);

bool MyDocument::OnSaveDocument(const wxString& filename) { return true; }
bool MyDocument::OnOpenDocument(const wxString& filename) { return true; }
bool MyDocument::IsModified(void) const { return true; }
void MyDocument::Modify(bool mod) { }

Could someone explain this to me?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20070705/297=
016fb/attachment.htm


More information about the wx-users mailing list