I'm having some weird issues with sort. I got the program working but for whatever reason numbers above about 53574 dont get displayed. I only found this by printing the values of the sort function out into the terminal to double check.
Here is the code for the sort function that I used, would be interested if anyone has some advice for me as to whats going wrong. I suspect its some sort of overflow error but I can't think of what caused it. I don't really know how to ask this without showing the code unfortunately :\
void sort(int values[], int n)
{
const int max = 65536;
int i;
int j = 0;
char count[max];
for ...
{
while(i <= n)
{
...
}
}
}
[EDIT: Text reinstated to keep question intact, unrelated code starting at for loop removed for honor code compliance]