[Courses] [C] *sigh* one last question =)

Andrew Edgecombe andrew.edgecombe at spheresystems.com.au
Mon Dec 9 11:56:20 EST 2002


strtoul() is also your friend, (along with it's close cousins strtod()
and strol())
These are a superset of the atoi() function, which include parameters
for getting the length of the string that was converted. (very useful if
you are parsing a series of values)
The downside is that they aren't quite as portable - but if you're
playing on *nix systems, you shouldn't have a problem.

Do a 'man strtoul' for more information, or alternatively, lookup the
glibc manual on www.gnu.org (specifically http://www.gnu.org/manual/glibc-2.2.5/html_node/Parsing-of-Integers.html#Parsing%20of%20Integers)

Hope this helps
-- 
Andrew Edgecombe <andrew.edgecombe at spheresystems.com.au>




More information about the Courses mailing list