i need make new thread in class and use it. Somethink like:
class Somethink
{
public:
func_to_be_thread();
init_func();
}
Somethink::init_func()
{
std::thread newThread(func_to_be_thread);
}
int main()
{
Somethink ss;
ss.init_func();
}
EDIT: How to make it correctly? Everythink i wrote returns error becouse idk how to make new thread in class with parameter (function to run) class method. My question is how to do it correctly?