Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » signature of the stou function
Re: signature of the stou function [message #876 is a reply to message #873] Mon, 06 February 2006 14:26 Go to previous messageGo to previous message
hojtsy is currently offline  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.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: bits/atomicity.h
Next Topic: Xmlize and double
Goto Forum:
  


Current Time: Mon Aug 18 15:37:42 CEST 2025

Total time taken to generate the page: 0.09614 seconds