Search:

Type: Posts; User: eager2no

Search: Search took 0.00 seconds.

  1. Replies
    17
    Views
    5,213

    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...
  2. Replies
    17
    Views
    5,213

    I can't believe this. I am using Code::Blocks...

    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...
  3. Replies
    17
    Views
    5,213

    tabstop, You sure know how to send a body...

    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...
  4. Replies
    17
    Views
    5,213

    C_ntua, Thanks for pointing this out. I'll do...

    C_ntua,
    Thanks for pointing this out.
    I'll do that, but only as a last resort - I'd hate to accept defeat :)
  5. Replies
    17
    Views
    5,213

    Elysia, Point taken, and I assure you I haven't...

    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...
  6. Replies
    17
    Views
    5,213

    Elysia, The real code is a lot bigger. I...

    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)...
  7. Replies
    17
    Views
    5,213

    My real main doesn't look like that. It is just...

    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*'
  8. Replies
    17
    Views
    5,213

    No ++ stuff, just plain C. I hope that doesn't...

    No ++ stuff, just plain C.
    I hope that doesn't disqualify me here...
  9. Replies
    17
    Views
    5,213

    sorting using pointer to pointer not working

    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...
Results 1 to 9 of 9