Okay, I got this to work by looking around online and such, but can someone explain what lines numbered 1 and 2 do exactly and why they are needed
int structCompare(const void *a, const void *b)
{
struct trade *tempA = (struct trade *)a;//(1)
struct trade *tempB = (struct trade *)b;//(2)
return strcmp(tempA->name, tempB->name);
}