Example 1 — Basic stoll()
Parse a large value.
#include <iostream>
#include <string>
int main() {
long long n = std::stoll("9000000000");
std::cout << n << '\\n';
return 0;
} How It Works
- The number is larger than a typical 32-bit int max.
- stoll stores it in long long.
- Output shows the full value.

