tags:

views:

13

answers:

1

here is my code: why does the error "one or more multiply defined symbols found?"

#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!");
        }
   }
}
A: 

Most likely, this has something to do with what's being included in person.h.

Jacob