I have a set of data that consists of a a list of unique numeric identifiers corresponding to a string title. I will be reading a list of files and in each file is one of the numeric identifiers at a specific offset. I want to read that information and use the numeric ID to provide the user with the corresponding string title.
I thought about using an enum, but my tests with enum didn't go so well, and I don't really understand how they work. Also, you can't use strings in enum's, right? On the flip side, there are 57 individual items, and they're categorized further in 3 categories (according to another piece of data I'm reading from the files.)
My question is, what will be the best way to store this data in my program so that I can read, for example, the value 30 from the file and have the program return the string corresponding to the identifier 30. List, array, enum? Some other method I haven't thought of? I'm totally open to suggestions, especially if it involves learning something new, so please, help me out.
I thought about using an enum, but my tests with enum didn't go so well, and I don't really understand how they work. Also, you can't use strings in enum's, right? On the flip side, there are 57 individual items, and they're categorized further in 3 categories (according to another piece of data I'm reading from the files.)
My question is, what will be the best way to store this data in my program so that I can read, for example, the value 30 from the file and have the program return the string corresponding to the identifier 30. List, array, enum? Some other method I haven't thought of? I'm totally open to suggestions, especially if it involves learning something new, so please, help me out.
Comment