Um... I'd rather not give the full solution, and for a good reason. How are you supposed to learn that way?
I'll give you a psudocode implementation of a sorting algorithm, namely one called Bubble sort. It's not very fast, but it's simple and easy to implement.
1 2 3 4 5 6 7 8 9 10 11
procedure bubbleSort( A : list of sortable items )
do
swapped = falsefor each i in 1 to length(A) - 1 inclusive do:
if A[i-1] > A[i] then
swap( A[i-1], A[i] )
swapped = true
end if
end forwhile swapped
end procedure
See if you can translate this into C++, and you'll be well on your way to creating that program!