|
|
I was doing this for a homework problem for class and keep running into this error. |
main.cpp||In constructor ‘menuItemType::menuItemType()’:| main.cpp|8|warning: ‘menuItemType::menuItem’ should be initialized in the member initialization list [-Weffc++]| main.cpp|8|warning: ‘menuItemType::menuPrice’ should be initialized in the member initialization list [-Weffc++]| main.cpp||In function ‘int main()’:| main.cpp|33|note: synthesized method ‘menuItemType::menuItemType()’ first required here | main.cpp||In constructor ‘orderType::orderType()’:| main.cpp|14|warning: ‘orderType::menuItem’ should be initialized in the member initialization list [-Weffc++]| main.cpp|14|warning: ‘orderType::itemPrice’ should be initialized in the member initialization list [-Weffc++]| main.cpp||In function ‘int main()’:| main.cpp|34|note: synthesized method ‘orderType::orderType()’ first required here | main.cpp|41|error: expected primary-expression before ‘]’ token| main.cpp|41|error: expected primary-expression before ‘int’| main.cpp|43|error: expected primary-expression before ‘]’ token| main.cpp|43|error: expected primary-expression before ‘]’ token| main.cpp|43|error: expected primary-expression before ‘int’| main.cpp|43|error: expected primary-expression before ‘int’| main.cpp|43|error: expected primary-expression before ‘int’| main.cpp|45|error: expected primary-expression before ‘]’ token| main.cpp|45|error: expected primary-expression before ‘int’| main.cpp|45|error: expected primary-expression before ‘const’| main.cpp|36|warning: unused variable ‘in’ [-Wunused-variable]| main.cpp|37|warning: unused variable ‘orderCount’ [-Wunused-variable]| main.cpp|38|warning: unused variable ‘count’ [-Wunused-variable]| main.cpp|39|warning: unused variable ‘select’ [-Wunused-variable]| main.cpp||In function ‘void printBill(orderType*, int, double)’:| main.cpp|124|warning: declaration of ‘TAX’ shadows a global declaration [-Wshadow]| main.cpp|20|warning: shadowed declaration is here [-Wshadow]| main.cpp|128|warning: declaration of ‘int orderCount’ shadows a parameter [-Wshadow]| main.cpp|124|warning: shadowed declaration is here [-Wshadow]| main.cpp|124|warning: unused parameter ‘orderCount’ [-Wunused-parameter]| main.cpp|124|warning: unused parameter ‘TAX’ [-Wunused-parameter]| ||=== Build finished: 10 errors, 14 warnings (0 minutes, 1 seconds) ===| |
getData(menuList[], int c);
getData(menuList, c);