C++ Functions. Run two at a Time.

Hi , i was wondering , how to run more than one function at the same time . I am basically trying to make a snake game in C++.
If you have a block falling function and another character move function , what can you do so that the block is falling as well as the character is moving?
Thanks.
To run two functions simultaneously you need to use multi-threading.
In your case, you can make a loop in which functions are executed sequentially and each function moves the falling block or the character not for the entire distance but just a bit of that so that the result would be that the user will see the block an the character moving at the same time.
Topic archived. No new replies allowed.