Take a look at these 2 codes.
The code below works fine.
void someFunction () {
// Some unimportant stuff
}
MainM::MainM(QObject *parent) :
QObject(parent)
{
std::thread oUpdate (someFunction);
}
This code throws an error:
void MainM::someFunction () { //as a class member
}
MainM::MainM(QObject *parent) :
QObject(parent)
{
std::thread oUpdate (someFunction);
}
Error:
error: no matching function for call to 'std::thread::thread(<unresolved overloaded function type>)'
std::thread oUpdate (someFunction);
^