i super new to c++ and i'm taking the second semester course, which i never took the first, so it's kinda hard for me with the syntax and all. here's my issue:
i hope this is all the code needed to figure it out. thanksCode:int getMenuOption() { int menuOption; cout << "Please make a selection:" << endl; cout << "1. Enter information for a plane." << endl; cout << "2. View information for a plane." << endl; cout << "3. Exit the program." << endl; menuOption = getValidInt("Enter the menu option: "); // <-- 'getValidInt': identifier not found return menuOption; } int getValidInt(char *prompt) { // <-- 'getValidInt' : redefinition; previous definition was 'formerly unknown identifier' const int MAX = 80; char buffer[MAX]; int i; cout << prompt; cin.getline(buffer, MAX); while (strlen(buffer) != strspn(buffer, "1234567890")) { cout << "Invalid integer - please re-enter: "; cin.getline(buffer, MAX); } i = atoi(buffer); return i; }



LinkBack URL
About LinkBacks



