실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘void merge(char*, int, int, int)’: Main.cpp:35:29: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] 35 | if(compareChar(arr[i],arr[j])){ | ~~~~~^ | | | char Main.cpp:17:23: note: initializing argument 1 of ‘bool compareChar(char*, char*)’ 17 | bool compareChar(char arr1[],char arr2[]){ | ~~~~~^~~~~~ Main.cpp:35:36: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] 35 | if(compareChar(arr[i],arr[j])){ | ~~~~~^ | | | char Main.cpp:17:35: note: initializing argument 2 of ‘bool compareChar(char*, char*)’ 17 | bool compareChar(char arr1[],char arr2[]){ | ~~~~~^~~~~~ Main.cpp:36:22: error: incompatible types in assignment of ‘char’ to ‘char [51]’ 36 | temp[k++]=arr[i++]; | ~~~~~~~~~^~~~~~~~~ Main.cpp:39:22: error: incompatible types in assignment of ‘char’ to ‘char [51]’ 39 | temp[k++]=arr[j++]; | ~~~~~~~~~^~~~~~~~~ Main.cpp:42:28: error: incompatible types in assignment of ‘char’ to ‘char [51]’ 42 | while(i<=mid){temp[k++]=arr[i++];} | ~~~~~~~~~^~~~~~~~~ Main.cpp:43:28: error: incompatible types in assignment of ‘char’ to ‘char [51]’ 43 | while(j<=mid){temp[k++]=arr[j++];} | ~~~~~~~~~^~~~~~~~~ Main.cpp:45:26: error: invalid conversion from ‘char*’ to ‘char’ [-fpermissive] 45 | arr[idx]=temp[idx]; | ~~~~~~~~^ | | | char* Main.cpp: In function ‘void mergeSort(char (*)[51], int, int)’: Main.cpp:52:23: error: expected primary-expression before ‘]’ token 52 | mergeSort(arr[][51],start,mid); | ^ Main.cpp:53:23: error: expected primary-expression before ‘]’ token 53 | mergeSort(arr[][51],mid+1,end); | ^ Main.cpp:54:19: error: expected primary-expression before ‘]’ token 54 | merge(arr[],start,mid,end); | ^ Main.cpp: In function ‘int main()’: Main.cpp:72:17: error: expected primary-expression before ‘char’ 72 | cout << char[i]<<"\n"; | ^~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.