题目:有一个包含了n个字符的字符串。编写一个函数,将此字符串从头开始共m个字符作为一个子字符串复制到另一个字符数组中,并输出该子串。
#include
#include
int m;
char str1[50];
char str2[50];
char copychar (str1,str2)
{
int i,j;
char *p1=str1[50];
char *p2=str2[50];
for (i=0,j=0;il)
printf("null\n");
else
copychar (str1,str2);
printf("%s",str2);
}
function-style initializer appears to be a function definition
它说错误在这,不明白呀。。求高人解释啊~~谢谢啊
字面的意思我懂。。关键是它指的什么呢。。