Im trying to run a function that will never end (until the program is killed)
How would i start such a function and be able to continue on past that function, because at the moment the program will not run past the never ending function.
Regards
Paul
You'd need to start a new thread. A given thread can only execute one function at a time. So, if you want to have two separate functions executing at the same time, you need multiple threads. You'll need to look into multi-threaded programming. If you're on linux or another unix-based system, then the library to look at would be pthreads.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With