Please help me work out why
This struct works
Code:
/* hashStruct */
struct test
{
List hashTable[MAXTABLE];
int secondVariable;
};
typedef struct test hashStruct;
And this struct works
Code:
struct myStruct
{
char *fileName;
char instanceName[MAX_LENGTH];
int customers;
int products;
int lowerBound;
int upperBound;
int TotalSegments;
int matrix[MAX_CUSTOMERS][MAX_PRODUCTS];
Product productArray[MAX_PRODUCTS];
/* flags section */
int maxIterations;
bool verbose;
bool elimSubsumed;
bool partition;
bool completeMOSP;
bool print;
bool branchAndBound;
bool aStarOriginal;
bool aStarStepwise;
bool aStarBackwards;
bool aStarBinaryChop;
bool Heuristic_TrivialBounds;
};
typedef struct myStruct mospData;
yet
Code:
struct myStruct
{
char *fileName;
char instanceName[MAX_LENGTH];
int customers;
int products;
int lowerBound;
int upperBound;
int TotalSegments;
int matrix[MAX_CUSTOMERS][MAX_PRODUCTS];
Product productArray[MAX_PRODUCTS];
List hashTable[MAXTABLE]; // this is the different line (line 50)
/* flags section */
int maxIterations;
bool verbose;
bool elimSubsumed;
bool partition;
bool completeMOSP;
bool print;
bool branchAndBound;
bool aStarOriginal;
bool aStarStepwise;
bool aStarBackwards;
bool aStarBinaryChop;
bool Heuristic_TrivialBounds;
}; // (line 65)
typedef struct myStruct mospData;
Gives me this message when i compile
50: error: syntax error before 'List'
50: warning: no semicolon at end of struct or union
65: error: syntax error before '}' token
I just don't get, it must be a syntax thing but i can't work it out.
Please help!