存在的问题

#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 *’
目前并不知道该怎么破。。

发布了18 篇原创文章 · 获赞 0 · 访问量 205

猜你喜欢

转载自blog.csdn.net/weixin_46456339/article/details/105100706
今日推荐