#include <stdio.h>
#include <string.h>
int main ()
{
printf("Enter string 2:");
int arr1[50],arr2[50];
gets(arr1);
strcpy(arr2,arr1);
printf("Output string 1:%s\n",arr2);
return 0;
}
有很多小警告:
Incompatible pointer types passing ‘int [50]’ to parameter of type ‘char *’
Format specifies type ‘char *’ but the argument has type ‘int *’
目前并不知道该怎么破。。