VC++ 8
I have created a form class with a combo box. I want to populate the combo box with data calculated from the form. This I can do. But I want to tie the string data in the combo box to numeric (double) value. Select the string and get a value. The information needs to be static.
Where I am having a problem is how to create a string and a double in an array. I tried several approaches with no luck. I do not want some one to write code for me. I want to understand how to create cobined data type arrays that can be sorted.
If I create a class for storing data, can I use a vector STL to crate an array of that object? Something like:
ref class MyStorage
{
public: MyStorage::MyStorage(void)
{
}
public: String^ MyString;
public: double MyDecimal;
public: int MyInt;
};
From my form class can I do something like this?
typedef vector< MyStorage > MY__OBJ;
typedef MY_OBJ::iterator MY_OBJ_IT;
Is this concept flawed?
Thanks,
Todd