我这程序怎么老有警告啊,请高手分析
#include <stdio.h>int main()
{
char *text[256]={NULL};
sprintf(text,"abc");
printf("%s\n",text);
return 0;
}
结果
--------------------Configuration: dd - Win32 Debug--------------------
Compiling...
dd.c
C:\Documents and Settings\dell\桌面\1\dd\dd.c(5) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'char *[256]'
C:\Documents and Settings\dell\桌面\1\dd\dd.c(5) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
Linking...
dd.exe - 0 error(s), 2 warning(s)
为什么有两个警告,应该如何修改?