Running C++ functions simultaneously
- by user2974881
My code is similar to the following:
int main()
{
values();
}
int values()
{
if (condition)
{
'code'
}
else if (condition)
{
'code'
}
else
{
'code'
}
motors();
}
int motors()
{
'code'
}
motors() needs values from values() to run. What could I do so that values() and motors() run simultaneously, side by side, and keep running until the user exits out of the program?