현재 C 프로그램을 작성 중입니다. 함수에서 구조체와 포인터를 사용하고 있습니다. 모든 것이 Windows에서 잘 작동하지만 Linux debian에서는 작동하지 않습니다. Linux 데비안에서 프로그램을 컴파일하려고 할 때 오류가 있습니다.C 코드가 Linux에서 컴파일되지 않았습니다. 데비안
typedef struct human
{
char name[100],code[100];
}human;
void hello(char* name, char* code)
{}
int main()
{
human human;
hello(&human.name,&human.code);
return 0;
}
이 난을 main.c 파일을 컴파일 할 때 사람들은 경고를 얻을 :
Warning passing argument 1 of Human from incompatible pointer type Note: expected char *a but argument is type of char(*)[100] Warning passing argument 2 of Human from incompatible pointer type Note: expected char *a but argument is type of char(*)[100]