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...
Type: Posts; User: eager2no
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...
I can't believe this.
I am using Code::Blocks 8.02.
I added
*r_pt_by_SeqNum
to the watch window, just as I did before every time. It displays the member structures, and it still shows garbage...
tabstop,
You sure know how to send a body scrambling to his compiler!
I was very much expecting it, but didn't get it.
If this works as you say, I must have fouled up something else in the...
C_ntua,
Thanks for pointing this out.
I'll do that, but only as a last resort - I'd hate to accept defeat :)
Elysia,
Point taken, and I assure you I haven't committed the sin mentioned in your post (and your sig).
Apart from that, do you have an idea why that sort routine works on items directly, but not...
Elysia,
The real code is a lot bigger.
I initially sorted on the structures themselves, and all was dandy.
The only two things I re-wrote was
- access to the structures (using pointers this time)...
My real main doesn't look like that. It is just for testing.
As for malloc, leaving it (void *) causes this compiler error:
error: invalid conversion from `void*' to `result*'
No ++ stuff, just plain C.
I hope that doesn't disqualify me here...
Hi,
I need to sort an array of structures by a structure member.
Sorting the array elements directly works fine, but is not fast enough.
So I re-wrote the merge sort routine to use an array of...