Yeah,selection sort, but i think is better using vectors ,in this way u won't have to implement the sorting code yourself :)