Running C++ functions simultaneously

Posted by user2974881 on Stack Overflow See other posts from Stack Overflow or by user2974881
Published on 2013-11-10T15:49:41Z Indexed on 2013/11/10 15:52 UTC
Read the original article Hit count: 103

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about c++

Related posts about c