> qsort(skill_table, MAX_SKILL, sizeof(skill_table), compare);

qsort(skill_table, MAX_SKILL, sizeof(skill_type), compare);

int compare(const void *a, const void *b)
{
    struct skill_type *skill1, *skill2;
    skill1 = (struct skill_type *)a;
    skill2 = (struct skill_type *)b;
    return strcmp(skill1->name, skill2->name);
    // not 100% sure on the order of those
}


Reply via email to