F
F
FX-Mercury2015-10-14 21:46:11
C++ / C#
FX-Mercury, 2015-10-14 21:46:11

Function pointer inside a C++ class, how to solve?

class CControl_console
{

     typedef void (CControl_console::*pfun3)( );

     pfun3 _class3;

    public:
        CControl_console( void ) 
        {

      _class3 =  &CControl_console::Start;

           _class3(); // вот здесь ругается. error C2064: результатом вычисления фрагмента не является функция, принимающая 0 аргументов
       }

        void Start( )
        {

        }
};

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question