I am observing error "warning C4090: 'function' : different 'const' qualifiers " because of below line of code. Going through other similar questions on SO I understand (not 100 percent) it is because of
--> const char* EmployeeList[] and my declaration in qsort of EmployeeList
#define Elements(array) (sizeof(array)/sizeof((array)[0]))
const char *EmployeeList[] =
{
"Larry Page", "Sergy Brin", "Sundar Pichai", "Merrisa Mayer"
};
// called from main
SortEmployee(EmployeeList, Elements(EmployeeList));
int Compare(const void *elemA, const void *elemB)
{
...
}
void SortEmployee(const char *EmployeeList[], size_t EmployeeCount)
{
qsort(EmployeeList, EmployeeCount, sizeof(EmployeeList[0]), Compare);
}
However I am unable to resolve it- Any pointers how to do it for array of strings.