QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#101067#2928. Espresso!GuanYunchangCompile Error//C++98608b2023-04-29 00:16:562023-04-29 00:16:56

Details

answer.code: In function ‘int main()’:
answer.code:19:25: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘const char*’
   19 |                 r+=atoi(x);
      |                         ^
      |                         |
      |                         std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:571,
                 from /usr/include/c++/11/iostream:38,
                 from answer.code:1:
/usr/include/stdlib.h:361:1: note:   initializing argument 1 of ‘int atoi(const char*)’
  361 | __NTH (atoi (const char *__nptr))
      | ^~~~~