0
這裏是我的代碼:爲什麼錯誤「找到一個或多個多重定義符號?」一個或多個多重定義符號發現錯誤的原因是什麼?
#include <stdio.h>
#include "person.h"
void main() {
FILE* census;
int status;
int data_read;
person student[10];
census = fopen("mycensus.dat","r");
if (census == NULL) {
printf("File not opened!");
}
else{
data_read = fread(student, sizeof(person), 10, census);
if (data_read != 10) {
printf("Not all data was read from file!");
}
}
}
你應該發佈person.h裏面的內容。 – Jacob 2010-07-21 02:20:36