> Is there an MFC class that works like a "record"?
>
> For example, I have a data struct that contains an index string and
> several data items.
>
> I would like to store a bunch of them in an array and be able to
> "lookup"
> an item by the index string.
>
> I searched MSDN and the one thing I found was a String to Pointer
> class where I could store an index string and a pointer to the rest of
> the data.  Is this the best there is?

Are you looking for a map?

 typedef std::map< std::string, your_data_struct > map_type;
 map_type theMap;
 theMap[ "index" ] = value;


-------------
Ehsan Akhgari

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]

Under conditions of peace the warlike man attacks himself.
-Beyond Good And Evil, F. W. Nietzsche





Reply via email to