Well I'm not running Redhat. It seems that Debian's gcc are configured for a variety of languages.
No wonder your c code wouldn't compile.

All the pointers seems to get me somewhat confused. But I managed to write a compare() function that's working in my c++ environment.

 int compare ( const void *a, const void *b ) {
    const info **pa = (const info **)a;
    const info **pb = (const info **)b;
    return strcmp( (*pa)->name, (*pb)->name );
>>also c style casts ( that is "(type)expression") should be avoided in >>c++.
>>there is static_cast and dynamic_cast.

As you can see the above code uses c style typecast. I haven't gotten to c++ typecasting yet. But I read some on the net but I can't get the c++ typecasting to work on the code above. Perhaps you could show a newbie how it should be done?