diff options
Diffstat (limited to 'cpp/002test.cc')
-rw-r--r-- | cpp/002test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/002test.cc b/cpp/002test.cc index af56ae97..488bbff4 100644 --- a/cpp/002test.cc +++ b/cpp/002test.cc @@ -82,9 +82,9 @@ bool is_number(const string& s) { return s.find_first_not_of("0123456789-.") == string::npos; } -int to_int(string n) { +long long int to_int(string n) { char* end = NULL; - int result = strtol(n.c_str(), &end, /*any base*/0); + long long int result = strtoll(n.c_str(), &end, /*any base*/0); assert(*end == '\0'); return result; } |