// Accepts and returns user's validated menu choice

#include <iostream>
#include "getChoice.h"

using namespace std;

void getChoice(char &menuSelection) {
	
	// Get the user's choice
	cin >> menuSelection;

	// Validate the choice
	while (menuSelection != 'H' && menuSelection != 'h' 
	    && menuSelection != 'S' && menuSelection != 's') {	
		cout << "Enter H or S: ";
		cin  >> menuSelection;
	}

	// Use uppercase for input
	menuSelection = toupper(menuSelection);

}