If you are ready to stick with MFC, follow aJ's answer.
Otherwise, you're better off with a standard library card. Be sure to check the documentation - there is much to learn. I usually use http://www.sgi.com/tech/stl/table_of_contents.html .
#include <map>
#include <string>
#include <utility> // for make_pair
using namespace std;
int main() {
std::map< string, struct_sample > myMap;
const struct_sample aTest = { 1,2,3 };
myMap.insert(make_pair( "test", aTest ) );
myMap[ "test2" ] = aTest;
const map<string, struct_sample >::const_iterator aLookupTest = myMap.find( "test" );
const bool bExists = aLookupTest != myMap.end();
aLookupTest->second.a = 10;
myMap[ "test" ].b = 20;
}
: typedef .