从PHP转学C请问各路神人一个qsort里面的有关问题

从PHP转学C请教各路神人一个qsort里面的问题
VC++6环境下报错说undeclared identifier
难道不能(*(fun *)ae).lis这样写,还是我Struct 定义出现问题,
struct 应该怎样写呢?

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
struct fun
{
int lis;
char strs[50];
}a[5];


int cmp ( const void *ae , const void *be )
{

int i;
long k1=(long)ae;
long k2=(long)be; 
printf("checking [%d:%d]==>[%6d|%6d]\n",k1,k2,(*(fun *)ae).lis,(*(fun *)be).lis);//这里出现问题!!!!!!!!!!!!!!
printf("[1]%s\n",(*(fun *)ae).strs);
printf("[2]%s\n",(*(fun *)be).strs);
printf("-------------------\n");
return (*(fun *)ae).lis>(*(fun *)be).lis?1 : -1; //强制转换类型
};

void main()
{
//读入
int i;
for (i=0;i<=5;i++)
{
printf("a[%d]=",i);
scanf("%d",&a[i].lis);
printf("[]str=");
scanf("%s",&a[i].strs);
}
printf("=====================\n");
//指针块排
qsort(a,6,sizeof(a[0]),cmp);
//输出
for (i=0;i<=5;i++)
{
printf("[%3i][%d]-->%5d|&s\n",i,&a[i],a[i].lis,a[i].strs);
}
}
c

------解决方案--------------------
(*(struct fun *)ae).lis 试试
------解决方案--------------------
你这PHP都没毕业啊, 循环越界了不知道吗, 优先级也不对啊.

#include <stdio.h>
#include <stdlib.h>

struct fun {
        int lis;
        char strs[50];
} a[5];

int cmp(const void *ae, const void *be)
{

        int i;
        long k1 = (long)ae;
        long k2 = (long)be;
    /* C不能省略struct, 除非typedef */
        printf("checking [%d:%d]==>[%6d
------解决方案--------------------
%6d]\n", k1, k2, (*(struct fun *) ae).lis, (*(struct fun *) be).lis);   //这里出现问题!!!!!!!!!!!!!!
        printf("[1]%s\n", (*(struct fun *) ae).strs);
        printf("[2]%s\n", (*(struct fun *) be).strs);
        printf("-------------------\n");

    /* 相等时候返回0呢? */
        return (*(struct fun *) ae).lis > (*(struct fun *) be).lis ? 1 : -1;    //强制转换类型 
};

void main()
{
//读入
        int i;
        for (i = 0; i <= 5; i++) { /* 越界 */
                printf("a[%d]=", i);
        fflush(stdout); /* 刷新缓冲 */
                scanf("%d", &a[i].lis);