Hallo,

beim Versuch einen Vector zu sortieren:
Code:
void MyClass::sort(vector< map<string,float> > myVector)
{   
    for(int i = myVector.size()-1; i>=1; i--)
    {
        for(int j=0; j<i; j++)
        {
            if(myVector[j]["value"]<myVector[j+1]["value"])
            {
                myVector.swap(myVector[j+1],myVector[j]);
            }
        }
    } 
}
erhalte ich den Fehler:

error: no matching function for call to `std::vector<std::map<std::string, float, std::less<std::string>, std::allocator<std:air<const std::string, float> > >, std::allocator<std::map<std::string, float, std::less<std::string>, std::allocator<std:air<const std::string, float> > > > >::s ...

Was mache ich Falsch und wie kann ich den Vector sortieren?