Created
September 6, 2011 13:25
-
-
Save kgabis/1197522 to your computer and use it in GitHub Desktop.
String to long unsigned int
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long unsigned int strToInt(char * str) | |
{ | |
long unsigned int result = 0; | |
while(*str) | |
{ | |
result *= 10; | |
result += *str - '0'; | |
str++; | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment