callback function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

callback function

which situation can ı use callback functions in c++?

1st Aug 2022, 4:22 PM
selim sultan çorbacı
selim sultan çorbacı - avatar
1 Answer
0
Well you can always use them. But it especially makes sense to use them in async/threaded applications. For example you want a thread to calculate something and call a function with the calculated values once it is done. So you can continue in your main thread to work on ither things and dont have to syncronize/wait as much
1st Aug 2022, 7:02 PM
Erarnitox
Erarnitox - avatar