Skip to content

Instantly share code, notes, and snippets.

@Seth-Johnson
Created December 4, 2014 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Seth-Johnson/704f388c957defebae30 to your computer and use it in GitHub Desktop.
Save Seth-Johnson/704f388c957defebae30 to your computer and use it in GitHub Desktop.
void convertBuffToInt(wchar_t buffer[]) {
int temp = 0;
for (int i = 0; i < sizeof(buffer) / sizeof(buffer[0]); i++) {
if (buffer[i] == '\0') {
break;
}
temp = temp * 10 + ((int)buffer[i] - 48);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment