Originally posted by The Dog
whenever you need to do a swap, you'll need a temporary variable.
Not necessarily. Here's another version of the swap function:
Code:
void swap(int* a, int* b)
{     
	*a^=*b^=*a^=*b;
}