[求助]请问这个程序为什么有9个错误呢?
#include<stdio.h>#include<string.h>
main()
{
char a[2]={'a','b'};
char b[2]={'c','d'};
char c[4];
char c[4]=char* strcat(char* a,char* b);
for(int i=0;i<4;i++)
printf("c[i]=%c",c[i]);
}
错误如下::\lei\lei\lei.c(8) : error C2086: 'c' : redefinition
D:\lei\lei\lei.c(8) : error C2059: syntax error : 'type'
D:\lei\lei\lei.c(9) : error C2143: syntax error : missing ';' before 'type'
D:\lei\lei\lei.c(9) : error C2143: syntax error : missing ';' before 'type'
D:\lei\lei\lei.c(9) : error C2143: syntax error : missing ')' before 'type'
D:\lei\lei\lei.c(9) : error C2143: syntax error : missing ';' before 'type'
D:\lei\lei\lei.c(9) : error C2065: 'i' : undeclared identifier
D:\lei\lei\lei.c(9) : warning C4552: '<' : operator has no effect; expected operator with side-effect
D:\lei\lei\lei.c(9) : error C2059: syntax error : ')'
D:\lei\lei\lei.c(10) : error C2146: syntax error : missing ';' before identifier 'printf'
Error executing cl.exe.
谢谢大家指点!!!