Mam problem z tym fragmentem kodu w BCB:
#include <iostream>
#include <fstream>
#include <cstring>
#include <vector>
using namespace std;
class Osoba
{
private:
string imie;
string nazwisko;
public:
........
bool operator< (Osoba z)
{
if(z.nazwisko==nazwisko)
{
if (imie<z.imie) return(true);
else return(false);
}
else
{
if (nazwisko<z.nazwisko) return(true);
else return(false);
}
}
};
[BCC32 Error] sort.cpp(35): E2093 'operator==' not implemented in type 'string' for arguments of the same type
[BCC32 Error] sort.cpp(37): E2093 'operator<' not implemented in type 'string' for arguments of the same type
W g++ to przechodzi bezproblemowo. Są jakieś alternatywy dla tych operatorów w Embarcadero?