You are right, Parksie... It also depends on how many items you have to sort. That is why there is even the knut rule for the Shell Sort.

Anyway... I was here again searching for code for translating the Automaton program. (Yes, I have translated the class State so far and now I am translating the class Automaton) and I need to sort a vector of strings. And yes, I found "algorithm.h" but the example i found was using the size of the string to sort it. How can I sort it alphabetically?

I tried the following:

PHP Code:
#include <string>
#include <vector>
#include <algorithm>

// compare strings by length, descending order
bool  compare(string const& xstring const& y)  {
    return 
y//x.size() > y.size();
}

void SortVector(vector<stringV){
    
sort(V.begin(), V.end(), compare);

What am I doing wrong? I don't want to program the Flagged-Bubble Sort... I already programmed MID, InStr and all those functions I would use on VB...