I made a quick summary of a project i have,
in which I have two threads that should be able to read and write on a common variable (protected by a mutex in the real project.

I don't understand this error

the two threads are in theory launched by a main thread
this main thread is a function of the object whose role is to manage the sub threads of this object.
I d'ont know if this is possible

main.cpp

```cpp
#include <thread>
#include "Object.h"

using namespace std;

int main(){
    Object tmp;
    tmp.ChangeSetting(42);

    thread mainthread(&Object::MainTread, &tmp);

    mainthread.join();
}

```

Object.h

```cpp
#ifndef SRC_OBJECT_H_
#define SRC_OBJECT_H_

#include <thread>
#include <iostream>
using namespace std;

class Object {
private:

    int stupidvalue;

    void subThread1();

    void subThread2();

public:

    void MainTread();

    void ChangeSetting(int psvalue);

    Object();
    virtual ~Object();
};

#endif /* SRC_OBJECT_H_ */

```

Object.cpp

```cpp
#include "Object.h"

void Object::subThread1(){
    cout << "subthread1";
}

void Object::subThread2(){
    cout << "subthread2";
}

void Object::MainTread(){
    thread tmp1(subThread1);
    thread tmp2(subThread2);

    tmp1.join();
    tmp2.join();

}

Object::Object() {
    stupidvalue = 0;
}

void Object::ChangeSetting(int psvalue){
    stupidvalue = psvalue;
}

Object::~Object() {
}

```

and my error

```
Info: Internal Builder is used for build
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\main.o" "..\\src\\main.cpp" 
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Object.o" "..\\src\\Object.cpp" 
In file included from ..\src\Object.h:5,
                 from ..\src\Object.cpp:2:
C:/msys64/mingw32/include/c++/10.2.0/thread: In instantiation of 'std::thread::thread(_Callable&&, _Args&& ...) [with _Callable = void (Object::*)(); _Args = {}; <template-parameter-1-3> = void]':
..\src\Object.cpp:13:24:   required from here
C:/msys64/mingw32/include/c++/10.2.0/thread:136:44: error: static assertion failed: std::thread arguments must be invocable after conversion to rvalues
  136 |           typename decay<_Args>::type...>::value,
      |                                            ^~~~~

10:26:25 Build Failed. 1 errors, 0 warnings. (took 1s.304ms)

```

I read that it could be a typing error, but there is no parameter.