/usr/include/wx-2.6/wx/string.h: In constructor `MainFrame::MainFrame(const
wxString&, const wxPoint&, const wxSize&)':
/usr/include/wx-2.6/wx/string.h:633: error: `wxString::wxString(int)' is
private
Base.cpp:25: error: within this context
Here's the original code:
#include <wx/wx.h>
#include "base.h"
IMPLEMENT_APP(MainApp) // Initializes the MainApp class and tells our program
// to run it
bool MainApp::OnInit()
{
// Create an instance of our frame, or window
MainFrame *MainWin = new MainFrame("CLICK", wxPoint(1, 1), wxSize(300,200));
MainWin->Show(TRUE); // show the window
SetTopWindow(MainWin); // and finally, set it as the main window
return TRUE;
}
MainFrame::MainFrame(const wxString &title, const wxPoint &pos, const wxSize
&size): wxFrame((wxFrame*)NULL, - 1, title, pos, size)
{
int random_int;
srand((unsigned)time(0));
random_int = (rand()%10)+1;
HelloWorld = new wxButton(this, BUTTON_Hello, random_int,
// shows a button on this window
wxDefaultPosition, wxDefaultSize, 0); // with the text "hello World"
CreateStatusBar(2);
}
void MainFrame::OnExit( wxCommandEvent& )
{
Close(TRUE); // Tells the OS to quit running this process
}