Help understanding something please
Im reading through a book that has a word jumble program that I don't understand a part of if anyone can explain. int main() { enum fields {WORD, HINT, NUM_FIELDS}; const int NUM_WORDS = 5; const string WORDS[NUM_WORDS][NUM_FIELDS] = { {"wall", "Do you feel you’re banging your head against something?"}, {"glasses", "These might help you see the answer."}, {"labored", "Going slowly, is it?"}, {"persistent", "Keep at it."}, {"jumble", "It’s what the game is all about."} }; 1. First I don't quite understand what ENUM is? 2. I understand that this is an array made of strings and I understand that Const int num_words=5 means that there are 5 possible words to unscramble. Meaning a 5 row array. 3. I understand that the array is called WORDS. and that it is [num_words] or 5 rows and [num_fields] is the number of columns. But no where does it set the number of columns? Should there not be a num_fields=2;? Later... srand(static_cast<unsigned int>(time(0))); int choice = (rand() % NUM_WORDS); string theWord = WORDS[choice][WORD]; //word to guess string theHint = WORDS[choice][HINT]; //hint for word I understand the 1st two lines. Set a random number with a seed of time and random number is between 0 and 4 based on number of words. but for string theHint=WORDS[choice][HINT] no where was an array with [HINT] established? Where is WORDS[num_words][num_fields]? This makes no sense to me please help.