求助!! 这个程序哪错了!
#include<stdio.h>#include<string.h>
#define MAX_SIZE 100
char *insert(char str[], char substr[], int i);
main()
{
char str[]={"I am mashaofei"};
char substr[]={"great"};
int i=5;
str=insert(str,substr,i); //error C2440: '=' : cannot convert from 'char *' to 'char [15]'
printf("%s",str);
}
char *insert(char str[], char substr[], int i)
{
int size1=strlen(str);
int size2=strlen(substr);
int count ;
for( count=size1; count>i; --count)
str[count+size2]=str[count];
for( count=0; count<size2; ++count)
{
str[i+1]=substr[count];
i++;
}
return str;
}
各位帮忙看看啊!这个语法错在哪了?