Any time I run my program after I make a selection from the menu the output is printed on the console screen then immediately a windows screen comes up saying project.exe has stopped working. Any and all thoughts/suggestions are welcomed. Below is my code, and I suspect the error has something to either A) due with how I'm calling the method or B) how I have the method coded.
int menuSelection; // variable for user input for the rolodex program
// below is listing the menu options for rolodex program
cout << "Welcome to the Rolodex-9000, please select from the following choices" << endl;
cout << "\t To Lookup a name press 1 " << endl;
cout << "\t To add a new entry press 2" << endl;
cout << "\t To print the Rolodex-900 press 3" << endl;
cout << "\t To exit, press 4 " << endl;
cin >> menuSelection;
// prompting user with menu options
cout << "Error, invalid selection. Please try again";
Remember, an array, such as int rolodex;, accepts numbers into rolodex thru rolodex, only. So trying to access rolodex, is accessing an out-of-bounds value, and you never know what that may be. It could really screw up your program.