struct Keyword { std::string keyword; int numUses; }; bool sortingVector(const Keyword& key1, const Keyword& key2) { return key1.numUses < key2
You probably want to call std::sort instead of plain sort and might have to include the appropriate header file (algorithmunless I'm mistaken).
std::sort
algorithm