Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<functional>
- std::function<int (char *)> strtoint = [](char * num)
- {
- int res = 0;
- while(*num) res = res*10 + *num++ - '0';
- return res;
- };
- int main()
- {
- std::cout << gorner("1234") << "\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement