I am trying to create a map that contains a string key and an vector of myClass.

```
std::map<string,vector<myClass>> m;

```

I need to populate the vector as well and the map dynamically (reading values from a file).

```
class myClass{
string dataMember1;
...
myClass()
     { ...  }
};

```

How should i proceed with it?? 

Also i want to be able to access the objects in the vector based on the string key.

for example: 

```
std::map<string,vConnect>::iterator pos;
pos = mapGraph.find(string);
cout<<(pos->second)[0]->DataMemberofmyClass

```

will (pos->second)[0] indicate the first myClass object stored in the vector??

Thanks