실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int main()’: Main.cpp:23:28: error: no matching function for call to ‘stoi(int)’ 23 | Pokedex_int[tmp] = stoi(i + 1); | ~~~~^~~~~~~ In file included from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/basic_string.h:6619:3: note: candidate: ‘int std::__cxx11::stoi(const string&, std::size_t*, int)’ 6619 | stoi(const string& __str, size_t* __idx = 0, int __base = 10) | ^~~~ /usr/include/c++/11/bits/basic_string.h:6619:22: note: no known conversion for argument 1 from ‘int’ to ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’} 6619 | stoi(const string& __str, size_t* __idx = 0, int __base = 10) | ~~~~~~~~~~~~~~^~~~~ /usr/include/c++/11/bits/basic_string.h:6750:3: note: candidate: ‘int std::__cxx11::stoi(const wstring&, std::size_t*, int)’ 6750 | stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) | ^~~~ /usr/include/c++/11/bits/basic_string.h:6750:23: note: no known conversion for argument 1 from ‘int’ to ‘const wstring&’ {aka ‘const std::__cxx11::basic_string<wchar_t>&’} 6750 | stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) | ~~~~~~~~~~~~~~~^~~~~ Main.cpp:14:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%d %d", &N, &M); // 입력받는 문자열 형태가 1, 2라면 .. %d, %d가 맞음. 근데 나는 1 2 형태라 %d %d로 입력받는 것!! | ~~~~~^~~~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.