Everyone knows the "traditional" method:
This method is not terribly fast but it works. If you want a little more speed you XOR (Exclusive OR) the two variables twice:
This method is a little bit faster but if you really want the highest performance possible you have to use ASM. The only disadvantage is that the code won't be platform-independent anymore:
The macro ASM_SWAP swaps first and second using ASM. I tried to write an inline function it didn't work really... I am not an ASM-Master so I dont know why. Simply copy this function into your code and you'll have the fastest swap method possible. Happy Coding!