I have a subclass of wxHtmlListBox called TestClass, but I get the error:
/usr/include/wx-2.8/wx/string.h:682:0 /usr/include/wx-2.8/wx/string.h:682: error: ‘wxString::wxString(int)’ is private
MainFrame.cpp:106:0 MainFrame.cpp:106: error: within this context
MainFrame.cpp line 106 is this:
TestClass *tc = new TestClass(this, wxID_ANY, wxDefaultPosition,
wxDefaultSize, NULL, wxBORDER_DEFAULT);
The files for TestClass can be found at http://cl.ly/1VSo
Any thoughts on this?
You’re passing wxBORDER_DEFAULT into a const wxString reference:
…but
wxBORDER_DEFAULTis part of an enum (essentially an integer):So it’s using the constructor you mentioned for a wxString:
…which is private and hence you’re getting an error. Try passing in a string or NULL instead 🙂