How to sort hex. number ?

This is a discussion on How to sort hex. number ? within the C++ Programming forums, part of the General Programming Boards category; If I have 10 hex number like this 1BAE96F58597ABB6 5848EFA6E8AFF991 3458DECA85ADC69 ...... How to write code to sort this hex ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    68

    How to sort hex. number ?

    If I have 10 hex number like this

    1BAE96F58597ABB6

    5848EFA6E8AFF991

    3458DECA85ADC69

    ......

    How to write code to sort this hex number?

    Thank you.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Are they represented as a string? Use strcmp().
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 02-19-2009, 07:19 PM
  2. Number Guessing
    By blacknapalm in forum C Programming
    Replies: 2
    Last Post: 10-01-2008, 02:48 AM
  3. adding a number to a number
    By bigmac(rexdale) in forum C Programming
    Replies: 11
    Last Post: 10-24-2007, 01:56 PM
  4. scanf oddities
    By robwhit in forum C Programming
    Replies: 5
    Last Post: 09-22-2007, 02:03 AM
  5. Storing random number in array(sequential search & bubble sort)
    By dukethacore in forum C++ Programming
    Replies: 5
    Last Post: 07-20-2005, 09:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21