실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int main()’: Main.cpp:24:12: error: cannot convert ‘std::vector<char>’ to ‘char*’ 24 | strcpy(tcharvec, tmp.c_str()); | ^~~~~~~~ | | | std::vector<char> In file included from /usr/include/features.h:486, from /usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h:39, from /usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h:586, from /usr/include/c++/11/iostream:38, from Main.cpp:1: /usr/include/aarch64-linux-gnu/bits/string_fortified.h:77:1: note: initializing argument 1 of ‘char* strcpy(char*, const char*)’ 77 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) | ^~~~~ Main.cpp:26:26: error: cannot convert ‘std::vector<char>’ to ‘const char*’ 26 | cout << isPalindrome(tcharvec) << " \n"; | ^~~~~~~~ | | | std::vector<char> Main.cpp:12:30: note: initializing argument 1 of ‘int isPalindrome(const char*)’ 12 | int isPalindrome(const char *s){ | ~~~~~~~~~~~~^
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.