class MyFuncClass
{
public:
void MainLoop() { ... }
};
struct MyClassInfos{
string name;
MyFuncClass* func;
};
vector<MyClassInfos> funcinfo;
int serviceCheck() {
for (int i = 0; i < funcinfo.size(); i++) {
funcinfo.at(i).func->MainLoop(); //need to make this a new Thread. (How?)
// std::thread td(funcinfo.at(i).func->MainLoop()); //obviously not going to work
}
}