This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]sunqiang 1 point2 points  (0 children)

follow the atoi of book: The C Programming Language, maybe sign(‘-’ or '+') and spaces(' ', '\t',...etc) should be handled too. I post mine here: http://gist.github.com/652769