I have the following map:

```
void groupIntoClasses (vector<FileData>fd, map<int,vector<FileData>> &classes )
{
    classes.clear();
    for (int i=0; i<fd.size(); i++)
    {
        string name = fd[i].fileName;
        string path = fd[i].filePath;
        string hash = fd[i].fileHash;
        int size = fd[i].fileSize;
        classes[size].push_back( {name,path,size,hash});
    }
}

```

which matches each of my FileData objects according to the field fileSize.
What I want to do now is erase the keys which are associated with only a single value (leave only all the duplicates in the map), but I am having difficulties handling the iterator.