C 错误:在头结构中的文件之前应有说明符限定符列表
嗨,我收到了几个编译器警告,我无法解决这个问题。我已经解决了其他一些小问题,但这些问题只是困扰着我。 谢谢你的帮助 标记 agent.h:10:错误:“文件”前应为说明符限定符列表C 错误:在头结构中的文件之前应有说明符限定符列表,c,struct,C,Struct,嗨,我收到了几个编译器警告,我无法解决这个问题。我已经解决了其他一些小问题,但这些问题只是困扰着我。 谢谢你的帮助 标记 agent.h:10:错误:“文件”前应为说明符限定符列表 感谢您的帮助这是因为文件不是基本类型;它包含在stdio.h标题中。所以您需要使用include在文件中包含它。这是因为文件不是基本类型;它包含在stdio.h标题中。因此,您需要使用include将其包含在您的文件中。哦,不,现在我得到了一个未定义的符号,用于带有“decode\u start\u pos”的架构,
感谢您的帮助这是因为文件不是基本类型;它包含在stdio.h标题中。所以您需要使用include在文件中包含它。这是因为文件不是基本类型;它包含在stdio.h标题中。因此,您需要使用include将其包含在您的文件中。哦,不,现在我得到了一个未定义的符号,用于带有“decode\u start\u pos”的架构,引用自:ccS7sGqg.o\n gcc-Wall-g-std=gnu99-pedantic-c error.c-o error.o\n gcc-Wall-g-std=gnu99-pedantic-c agent.c-o agent.o\n gcc-Wall-g-std=gnu99-pedantic-c-io.o\n gcc-Wall-g-std=gnu99-pedantic-c-c-map.c-o map.o\n我使用gcc-Wall-g-std-g-std=gnu99-gnu99-pedantic-c-c-c-c-c-c-c-c-c-c-o-c-c-c-o-o-o-o想法?对不起@marknicole,没有更多细节我帮不了你。我相信,如果你无法通过研究找到答案,你就必须提出另一个问题。好的,我刚刚发布了另一个问题。干杯@nimsoh不现在我得到了一个未定义的建筑符号,带有“解码”和“开始”位置,引用自:ccS7sGqg.o\n gcc-Wall-g-std=gnu99-pedantic-c error.c-o error.o\n gcc-Wall-g-std=gnu99-pedantic-c agent.c-o agent.o\n gcc-Wall-g-std=gnu99-pedantic-c-io.o\n gcc-Wall-g-std=gnu99-pedantic-c-c-map.c-o map.o\n我使用gcc-Wall-g-std-g-std=gnu99-gnu99-pedantic-c-c-c-c-c-c-c-c-c-c-o-c-c-c-o-o-o-o想法?对不起@marknicole,没有更多细节我帮不了你。我相信,如果你无法通过研究找到答案,你就必须提出另一个问题。好的,我刚刚发布了另一个问题。干杯@nims
#ifndef AGENT_H
#define AGENT_H
struct AgentInfo {
int cordRow;
int cordCol;
char indicator;
char* fileName;
char direction;
pid_t agentPid;
FILE* agentIn;//Error shows here
FILE* agentOut;;
struct AgentInfo *next;
};
struct AgentInfo *createLinkedList(int r,int c, char i, char *fn, char dir);
struct AgentInfo *addToLinkedList(int r,int c, char i, char *fn, char dir);
struct AgentInfo *findAgent(char* fn, struct AgentInfo **prevAgent);
extern struct AgentInfo *head = NULL;
extern struct AgentInfo *current = NULL;
#endif