Assume you have a variable x, and a string called stringx. (With size 26, for example)
What would be the correct way of inputting x into the next available stringx value?
i.e. if you have this loop (where char x;)
1 2 3 4 5 6 7
for (int = miss = 6; miss > 0; miss--)
{
cout <<"Enter a letter: ";
cin >> x;
cout << endl;
}
And in this situation for every time the loop runs, I want to assign whatever the user inputs x as as the next unassigned slot in stringx. How would I do this?