Swaping values of two variable without temporary variable





3.00/5 (2 votes)
There is also InterlockedExchange (or your operating system's equivalent).long a = 1;long b = 2;b = InterlockedExchange(&a, b);
There is also InterlockedExchange (or your operating system's equivalent).
long a = 1;
long b = 2;
b = InterlockedExchange(&a, b);