Sorting using pointer to pointer not working - SOLVED
Thank you all for helping.
And a big thank you again to tabstop for making me actually look at the values themselves instead of relying blindly on what the IDE showed me.
To sum it up:
1. The routine was working all along.
2. I instructed Code::Blocks to watch
as an array, and it did in fact list the structure array, but with wrong values, except for structure[0]. So I assumed a was seeing the right thing (the array), and that the routine was not working.
3. tabstop's post resolved the issue: I listed each array[i]->seq_num, and lo and behold, they had the right values.
4. So I either instructed Code::Blocks incorrectly about what to show, or this is a bug in Code::Blocks. It did list the structures of the array, but did not resolve what the individual pointers in the array pointed to, except for array item[0].
Now I can get on with the program.
Thank you all.