How to compare the size of the two id

113 0

For example,
Id_1 ="01223698797465646""
Id_2 ="01223368956456456""
My approach is that a comparison of these numbers is like a atoi ( ) function, and I see that someone is comparing directly with ( ) or strtol ( ), I'm wrong, and the atoi ( id_1 )?

4 Answers

110 3

If the id number is too large to Int, my idea is to split into paragraphs ( this id number looks like two pieces ), then compare to left to right, if a [ 1 ]> b [ 1 ], you can continue to determine the size of the second paragraph if a is

124 2
...