void MainMenu::onOptions() { OptionsMenu* pOptionsMenu = new OptionsMenu(); int ret = pOptionsMenu->showMenu(); delete pOptionsMenu; if(ret == MENU_QUIT_REINITIALIZE) { quit(MENU_QUIT_REINITIALIZE); } }
void MainMenu::OnOptions() { OptionsMenu* myOptions = new OptionsMenu(); if(myOptions == NULL) { perror("MainMenu::OnOptions()"); exit(EXIT_FAILURE); } int ret = myOptions->showMenu(); delete myOptions; if(ret == 1) { quit(1); } }