0
volatile this en c++
Volatile this no entiendo como se puede usar, ni para que sirve, me gustaría que pudieran darme un ejemplo de su uso.
1 Respuesta
0
I hope it is ok to anwer in English. Volatile means: every time when the value is used in the code it is re-read from the memory, also it might already be in a register. Where does this help - in multi-threaded environments - you make sure that the latest value in the variable is read, that might have been changed since last access by another thread.
If you don't do mutli-threaded programming ignore volatile.