I have a structure defined in a header file like this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
struct design
{
string name;
int sheetsInStock;
int envelopesInStock;
int notepadsInStock;
double sheetPrice;
double envelopePrice;
double notepadPrice;
int dailySheetSales;
int dailyEnvelopeSales;
int dailyNotepadSales;
int monthlySheetSales;
int monthlyEnvelopeSales;
int monthlyNotepadSales;
}libraryOne[10], libraryTwo[10];
|
The problem is is that when I run the program I get the following errors and I'm not for sure why. I've done something similiar in a program before and it worked fine. Here are the error codes:
1>c:\users\casey\documents\danny\school\computer programming ii\projects\stationary shop\stationary shop\variables.h(5) : error C2146: syntax error : missing ';' before identifier 'name'
1>c:\users\casey\documents\danny\school\computer programming ii\projects\stationary shop\stationary shop\variables.h(5) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\casey\documents\danny\school\computer programming ii\projects\stationary shop\stationary shop\variables.h(5) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>main.cpp
1>c:\users\casey\documents\danny\school\computer programming ii\projects\stationary shop\stationary shop\variables.h(5) : error C2146: syntax error : missing ';' before identifier 'name'
1>c:\users\casey\documents\danny\school\computer programming ii\projects\stationary shop\stationary shop\variables.h(5) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\casey\documents\danny\school\computer programming ii\projects\stationary shop\stationary shop\variables.h(5) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\main.cpp(244) : error C2039: 'name' : is not a member of 'design'
That is exactly as it appears in the compiler.