Источник забавы. Для Ъ:
// 3rd variant
static bool compareCCString(const CCObject* p1, const CCObject* p2) {
    const char* obj = (const char*)p1;
    const char* obj1 = (const char*)p2;
    return strcmp(obj,obj1);
}
// 4th variant
static bool compareCCString(const CCObject* p1, const CCObject* p2) {
    CCString*  obj = (CCString*)p1;
    CCString* obj1 = (CCString*)p2;
    int temp_length1 = sizeof(obj->getCString());
    int temp_length2 = sizeof(obj1->getCString());
    int i=0;
    while ((i < temp_length1) && (i < temp_length2)) {
        if (tolower (obj->getCString()[i]) < tolower (obj1->getCString()[i]))
            return true;
        else if (tolower (obj->getCString()[i]) > tolower (obj1->getCString()[i]))
            return false;
        i++;
    }
    return false;
}
Я даже не хочу там больше ничего писать.






