hojtsy Messages: 241 Registered: January 2006 Location: Budapest, Hungary
Experienced Member
stou returns 0xFFFFFFFF in case of error. Maybe that could be considered as Null for unsigned.
Anyway I think that converting a string to unsigned int, signed int, and double are similar operations and should have similar interface for the client code. So if you can not or do not want to provide an invalid return value, then one more parameter should be added for success indication, or the client code should check the endptr to see if the conversion succeeded. It is not really intuitive for the client programmer to call stou and check for 0xFFFFFFFF for unsigned integers, and call ScanInt and check for Null for signed integers.