这段c语言为什么报错
#include<stdio.h>#include<stdlib.h>
void main()
{
unsigned int i,n;
unsigned int *a;
printf("输入一个班组的人数:");
scanf("%d",&n);
a =calloc(n, sizeof(unsigned int));
if(a==NULL){printf("动态存储分配失败!\n");exit(1);}
printf("输入%d个职工的年龄:\n",n);
for(i=0;i<n;i++)scanf("%d",a+i);
for(i=0;i<n;i++)printf("%d",a[i]);
printf("\n");
free (a);
}
报错:--------------------Configuration: aaa11 - Win32 Debug--------------------
Compiling...
aaa11.cpp
D:\c语言练习上机练习\第20章\第20章\aaa\aaa11.cpp(9) : error C2440: '=' : cannot convert from 'void *' to 'unsigned int *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
执行 cl.exe 时出错.
aaa11.obj - 1 error(s), 0 warning(s)
哪里错了???请高手解答