This isn't a duplicate. I don't want to compare strings and the possible duplicate contains much to much information.
Is there a function compareTo
in C++
like in Java
?
int compareTo(T o)
Parameters: o - the object to be compared.
Returns: a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.