我工作的学校链表上,我得到一吨的错误。我敢肯定,大概有只有一件事错了我的代码,但我似乎无法找到它我已经评论了我的大部分代码,所以我不需要在这里粘贴200行,主要的错误仍然显示,虽然只是少了几次缺少“(”前“*”
错误是:
error C2143: syntax error : missing '{' before '*'
我有大概50-75错误一起之前,我注释掉我的代码这些准则弹出,但仍有少数与此代码。任何帮助,将不胜感激。
//main.c
#define BUFFER_SIZE 1000
#include<stdio.h>
#include<stdlib.h>
#include"ListElmt.h"
#include"List.h"
#include"ListData.h"
int main(int argc, char *argv[]){
}
//List.c
#include<stdlib.h>
#include"List.h"
#include"ListElmt.h"
#include"ListData.h"
//List.h
struct List{
int size;
struct ListElmt *head;
struct ListElmt *tail;
};
//ListData.h
struct ListData {
int hour;
int min;
double temp;
int AC;
};
//ListElmt.h
struct ListElmt {
ListData *data;
ListElmt *next;
ListElmt *prev;
};
这是C或C++?在C中,结构体名称不是自动键入的名称。 –
是的'ListElmt'一个错字的成员'struct'遗漏,或者是你的实际代码? – jpm
....和可爱请,***使用***空格。 'int main(int argc,char * argv []){}'*只是伤害。* – 2012-10-07 05:54:17