프갤 형들 c언어 시작한지 얼마 안되는 뉴비인데 질문좀 할게





#include <stdio.h>

#include <string.h>

int lookup(char *word, char *p)

int main(){


char *flab[] = {

"actually",

"just",

"quite",

"really",

NULL

};


char str1[30];

printf("검색할 단어를 입력하시오.");

gets(str1);


if(lookup(str1,flab[0])==-1){

printf("검색한 단어가 존재하지 않습니다.");

}

else{

printf("검색한단어는 %d번째에 존재한다.",lookup(str1,flab[0]));

}

}


int lookup(char *c, char *p)

{


int i;


for(i=0; p[i] !=NULL; i++)

if (strcmp(c,p[i])==0)

return i;

return -1;

}




문자열 포인터 배열에 저장된 문자를 순차검색으로 위치를 찾으려고 하는데


저기서 함수명 lookup에서 함수 strcmp안에 p[i]가 char 형식의 인수가 const char * 형식의 매개 변수와 호환되지 않습니다.


라면서 디버깅이 안 되는데 해결좀 부탁함!!


c언어 배운지 얼마 안되는 좆뉴비임 ㅠㅠ