Consider:
void Function()
{
while (true)
{
// Doing stuff
}
}
int maincodeeee()
{
Function();
std::cout << "blablabal" << std::endl;
}
How can I launch Function() in a separate thread, but still continue the code in maincodeeee()?