Not really sure what’s causing this, all I’ve found on google is that forgetting a semi-colon at the end of my struct causes this but I have one there.
Here’s the chunk of code…
#include <stdio.h>
#include <string.h>
#define NAME_LENGTH 20
#define BOOK_NAME_LEN 50
#define AUTHOR_NAME_LEN 30
enum bookStatus {CHECKED_IN, CHECKED_OUT, UNDER_REPAIR, LOST}
enum patronStatus {ACTIVE, INACTIVE}
struct Book{
char title[BOOK_NAME_LEN];
char author[AUTHOR_NAME_LEN];
enum bookStatus status;
};
struct Name{
char first[NAME_LENGTH];
char last[NAME_LENGTH];
};
struct Patron{
int numBooksOut;
struct Name name;
struct Book books[50];
enum patronStatus status;
};
struct Collection{
struct Book book;
char title[BOOK_NAME_LEN];
char author[AUTHOR_NAME_LEN];
int id, year;
enum bookStatus status;
};
struct Library{
int totalPatrons, totalBooks;
struct Patron patrons[50];
struct Collection collection[50];
};
The enums need a semicolon, too.