cannot convert from type void*(classname::) () to type void*(*)(void*)

前端 未结 3 1033
情深已故
情深已故 2021-02-15 15:16
class Scoreget{
    private:
        //some variables
    public:
        Scoreget(){
            //something here
        }

        void* basicgetscore(){
                     


        
3条回答
  •  一生所求
    2021-02-15 15:27

    You need to define a non member (static) function to pass as thread function for pthread_create(). Referencing from your object doesn't help, since this is a function pointer that is expected from this function. You can pass a pointer to your object instance using the user args void* pointer though.

提交回复
热议问题