I'm still getting in to programing in C++, but one of the things I wanted to do for fun is write a program that randomly generates a number and then compares that number to a numbered list of stringed characters. Once it finds the corresponding number in the list it displays that string of characters. I know the idea of using randomly generated number using random(time(NULL)), but my problem is then taking that number and comparing it to a numbered list and displaying the string attached to the corresponding number. If someone could point me in the right direction as to how to compare them I would be grateful.
The worst part is I haven't found an example, in code at least. A non-code related example would be like a random loot generator. I thought about using switch cases to achieve the list or even pulling from another function that defines a list of strings. I'm just not sure how to go about it.