변수나 함수가 선언되지 않았어요.
변수나 함수를 선언하고 사용하고 있는지 확인해 보세요.
혹은 이 스코프 바깥에서 선언된 변수나 함수를 사용하고 있지는 않나요?
Main.cpp: In function ‘int main()’: Main.cpp:8:20: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive] 8 | int len=strlen(ch); | ^~ | | | char In file included from Main.cpp:2: /usr/include/string.h:407:35: note: initializing argument 1 of ‘size_t strlen(const char*)’ 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~ Main.cpp:10:15: error: invalid types ‘char[int]’ for array subscript 10 | if (ch[i]==' ') { | ^ Main.cpp:11:13: error: ‘word’ was not declared in this scope; did you mean ‘words’? 11 | word[wcnt][wlen]='\0'; | ^~~~ | words Main.cpp:16:13: error: ‘word’ was not declared in this scope; did you mean ‘words’? 16 | word[wnct][wlen]=ch[i]; | ^~~~ | words Main.cpp:16:18: error: ‘wnct’ was not declared in this scope; did you mean ‘wcnt’? 16 | word[wnct][wlen]=ch[i]; | ^~~~ | wcnt Main.cpp:16:32: error: invalid types ‘char[int]’ for array subscript 16 | word[wnct][wlen]=ch[i]; | ^ Main.cpp:20:21: error: ‘word’ was not declared in this scope; did you mean ‘words’? 20 | int len1=strlen(word[0]); | ^~~~ | words Main.cpp:4:10: warning: unused variable ‘words’ [-Wunused-variable] 4 | char words[2][101]; | ^~~~~ Main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%[^\r\n]",&ch); | ~~~~~^~~~~~~~~~~~~~~~