Created
June 4, 2016 13:36
-
-
Save ilpropheta/2231c619f2fa190603b8f6caa9060b49 to your computer and use it in GitHub Desktop.
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
const string number = "1234"; | |
auto toUInt = accumulate(begin(number), end(number), 0u, [](unsigned curr, char nxt){ | |
return curr * 10u + nxt - '0'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment