Well I am sorry that you are having trouble. But it would just not be right for me to give you the answers. I'll give you direction though.
You can sort using the qsort() function found in cstdlib
You can declare an array of ints the same way you declare an array of chars
To use qsort() must write a function to declare two entries.
Code:
int my_compare(const int *param1, const int *param2) {
return *param1 - *param2;
}
The rest I'll leave up to you. I should point out that you must use type casting in order to use my sample compare function.
Code:
qsort(some_array, array_size, sizeof(int), (int(*)(const void*, const void *))my_compare);
Enjoy.