Re: Nested sort on a linked list

Discussion in 'C++' started by Richard Herring, Apr 1, 2004.

  1. [moderated group removed]

    In message <>, Mike Jeffers
    <> writes
    >Hi all,
    >
    >I'm pretty new to programming and need help to do a nested sort on a
    >linked list.
    >
    >Basically I'm sorting a list of structures with names, classroom
    >number and floor level. I can sort in scending order any of the 3
    >values but I need to do a nested sort first with floor, followed by
    >classroom number and finally name.
    >
    >Please tell me where I have gone wrong with this.


    Failing to use std::list, std::sort() (and maybe std::stable_sort() ) ?

    Standard C++ is more than just a language; it includes a library which
    means you don't have to go through the (as you have discovered)
    error-prone process of reinventing your own linked lists and sort
    algorithms.

    --
    Richard Herring
     
    Richard Herring, Apr 1, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Ritchey
    Replies:
    7
    Views:
    484
    emerth
    Jul 10, 2003
  2. Mike Wahler

    Re: Nested sort on a linked list

    Mike Wahler, Apr 1, 2004, in forum: C++
    Replies:
    1
    Views:
    635
    Bill Weston
    Apr 1, 2004
  3. fool
    Replies:
    14
    Views:
    513
    Barry Schwarz
    Jul 3, 2006
  4. joshd
    Replies:
    12
    Views:
    675
    John Carson
    Oct 2, 2006
  5. Navin
    Replies:
    1
    Views:
    705
    Ken Schaefer
    Sep 9, 2003
Loading...

Share This Page