这是我的情况的简化:
头文件.h
#DEFINE NUMBER 3
extern char reserved[][];
Run Code Online (Sandbox Code Playgroud)
定义器
char reserved[NUMBER][4] = {"WOW","LOL","K"}
Run Code Online (Sandbox Code Playgroud)
符号.c
#include "header.h"
void theFunctionWithTheError{
if (reserved[1] == "I love stackoverflow"){ /**THE LINE OF THE ERROR*/
return;
}
}
Run Code Online (Sandbox Code Playgroud)
在 sign.c 中,我收到错误Expression must be a pointer to a complete object type
for the wordreserved
你建议我做什么?