diff options
Diffstat (limited to '002test.cc')
-rw-r--r-- | 002test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/002test.cc b/002test.cc index bf0611f2..46f07b00 100644 --- a/002test.cc +++ b/002test.cc @@ -88,10 +88,10 @@ bool is_integer(const string& s) { && s.find('-', 1) == string::npos; // '-' only at first position } -long long int to_integer(string n) { +int to_integer(string n) { char* end = NULL; // safe because string.c_str() is guaranteed to be null-terminated - long long int result = strtoll(n.c_str(), &end, /*any base*/0); + int result = strtoll(n.c_str(), &end, /*any base*/0); if (*end != '\0') cerr << "tried to convert " << n << " to number\n"; assert(*end == '\0'); return result; |