-
Im gonna add about 1000 items to a combo box. And then when someone clicks a button, i need to get the corresponding number to each string. My quesiton is do i have to compare whatever string they pick to 1000 others using case statements, or can i give data to each string that i give the combo box, and then just get the data with the string.
-
How about an array using the index of the combo box:
Code:
int pArray[1000] = { ... };
Although if there's 1000 items it would be a much better idea to load them dynamically from a data file.
-
I thought about that, but i want the combo box to be sorted, so all the items would be out of wack.
-
An array of UDTs? Try using the STL map class?
-
Class? Are you talking MFC? Cuz im not using MFC.
-
Nope. I'm talking the C++ Standard Library, of which the STL (Standard Template Library) is a part.