Here are my comments:
1 - Don't use globals
The person global is only used in main anyway, but globals should be avoided in general as the make code less modular (and anti object oriented programming), making it harder to reuse code. Global variables can also lead to subtle bugs beyond naming conflicts.
2 - STL algorithms and containers
The swap and sort functions look fine. The Standard Template Library (STL) defines all of these functions, also. It's very good to implement these yourself in order to learn the basics of the language. It's also very important to learn what is already defined in the STL because it will save you time and you will come across them when reading more advanced code. If you want to become a really good C++ programmer, try to learn and incorporate the stl and standard library as much you can.
Check out:
http://www.cplusplus.com/reference/algorithm/swap/
http://www.cplusplus.com/reference/algorithm/sort/
Also, use std::vector instead of an array. Vectors are awesome.
I highly suggest trying to rewrite your code using std::sort because it will push you to learn more advanced techniques. Try using vector first, then swap, then sort; and watch your code shrink!
3 - Function declaration/definition style
It's generally considered good style to put the function declarations at the top (just as you did) and put the definitions after main(), and
higher-level functions above
lower-level functions. This means helper functions come after functions that use those helper functions, which you did anyway.
If you have trouble using std::sort() or other std things, just repost.