Here is my piece of code:
Code: Select all
class MyPanel : public wxPanel
{
public:
MyPanel(MyFrame *frame);
virtual ~MyPanel();
private:
void start_database ();
protected:
static int getStartPoint(DPoint3d * pt,int view);
};
/*----------------------------------------------------------------------+
name start_database +----------------------------------------------------------------------*/
void MyPanel::start_database ()
{
printf ("start_database\n");
return;
}
/*----------------------------------------------------------------------+
name getStartPoint +----------------------------------------------------------------------*/
int MyPanel::getStartPoint (Dpoint3d *pt, int view)
{
start_database ();
return TRUE;
}
/*----------------------------------------------------------------------+
| OnStartClick |
+----------------------------------------------------------------------*/
void MyPanelBaza::OnStartClick( wxCommandEvent& WXUNUSED(event) )
{
mdlState_startPrimitive (getStartPoint, NULL, 0, 0);
}
error C2352: 'MyPanel::start_database' : illegal call of non-static member function
see declaration of 'start_database'
So How can I access from static getStartPoint function to non-static function start_database.
Can anybody help me and correct my code to compile?