[ad_1]
I would advise you to take a look at this link: https://www.tutorialcup.com/cplusplus/multithreading.htm
It has many examples and lots of theory to read and understand about threads and multithreading.
[ad_2]
solved How to pass a value in a function and put the function in a thread?