i need help modifying this program to Create a function that has the following prototype: void getInputChar(string, char &);.
The function should display the string on the screen and then use cin to read a char from the keyboard.
#include <iostream>
using namespace std;
bool ignoreCaseCompare (char, char);
int main ()
{
char first = ' ';
char second = ' ';
char answer = ' ';
cout << "Enter a letter: ";
cin >> first;
cout << "Enter a letter: ";
cin >> second;
cout << "";
answer = ignoreCaseCompare (first, second);
cout << endl;
return 0;
}
bool ignoreCaseCompare (char one, char two)
{
one = toupper(one);
two = toupper(two);
if (one == two)
cout << "The two letters are the same. ";
else
cout << "The two letters are not the same. ";
system("pause");
return 0; }
//end main function
any help will be considered helpful thank you.