我工作的學校鏈表上,我得到一噸的錯誤。我敢肯定,大概有隻有一件事錯了我的代碼,但我似乎無法找到它我已經評論了我的大部分代碼,所以我不需要在這裏粘貼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