I'm currently working through some exercises in a c++ book, which uses text based games as its teaching tool. The exercise I am stuck on involves getting the pc to select a word from a const array of words (strings), mixing the letters up and asking the player to guess the word. This was easy, but as a follow on the book asks to add the option to provide a hint to the player to help them guess, firstly as a parallel array (again, no problem) and then as a 2 dimensional array. This is where I'm stuck. My (shortened) array of words is as follows:
const string WORDS[NUM_WORDS] = {"wall", "glasses"};
I need to provide a hint for each of these words but not sure how to go about it. Posting this from phone so extensive googling is not an option!
My parallel array was as follows:
const string HINTS[NUM_WORDS] = "brick...", "worn on head"};
Just need to combine the two.
Thanks in advance, Barry