I have declared a struct (see below) in a header file to be used in two source files, however when I compile I get a multiple declaration error even though it only declared once can anyone explain this error??
//this is the struct declared in the header
struct student_data
{
int student_number;
char name[26];
char address[26];
char post_code[8];
char telephone[14];
char course[3];
};
//reference it in source file
struct student_data student
when compiled it returns an error? why?
//this is the struct declared in the header
struct student_data
{
int student_number;
char name[26];
char address[26];
char post_code[8];
char telephone[14];
char course[3];
};
//reference it in source file
struct student_data student
when compiled it returns an error? why?