run threads of class member function in c++

后端 未结 3 1960
别那么骄傲
别那么骄傲 2020-12-06 08:26

As the title says. The following is my code skeleton.

class CLASS
{
public:
    void A();
private:
    DWORD WINAPI B(LPVOID);
};

void CLASS::A()
{
    DWOR         


        
3条回答
  •  既然无缘
    2020-12-06 08:28

    You have to make that member function static.

    The problem here is that every non-static member function has an implicit this parameter and that's in fact what the compiler is trying to tell you - your nin-static member function has signature different from the one you expected.

    Also see this answer to a closely related question.

提交回复
热议问题