Results 1 to 5 of 5

Thread: sorting an array of doubles [solved]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jul 2012
    Posts
    247
    Thanks
    29
    Thanked 15 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sorting an array of doubles [solved]

    Yes, you need to have a coparison operator for your struct or pass a lambda to the std::sort. See here: https://en.cppreference.com/w/cpp/algorithm/sort

  2. The following user says thank you to tuli for this useful post:

    Cremers (29th September 2018)

Similar Threads

  1. How to parse nested JSON Array and Object inside array
    By Radhika in forum General Programming
    Replies: 5
    Last Post: 17th December 2015, 08:42
  2. tableview with doubles
    By Arend in forum Newbie
    Replies: 2
    Last Post: 26th November 2012, 06:43
  3. Cast QString array to std::string array
    By Ishtar in forum Newbie
    Replies: 4
    Last Post: 15th July 2011, 08:28
  4. Replies: 2
    Last Post: 12th November 2010, 14:42
  5. declare an array of QSemaphore and array of slot functions
    By radeberger in forum Qt Programming
    Replies: 11
    Last Post: 2nd May 2010, 13:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.