I got it in my head to start writing some simple sorting algorithms a little while ago and decided that it would make my life easier to also write a swap function as well.
The problem is that while my swap algorithm seems to work just fine in the sort function, when I put it into it's own function it simply doesn't work. Here's the code: http://codepad.org/dxuC9vLE
When I run it through the debugger it looks like the values are being changed in a and b correctly but once the function exits the values go right back to their original declaration. Any ideas?