鱼C论坛

 找回密码
 立即注册
查看: 7137|回复: 3

error C2733: “strcpy”: 不允许重载函数的第二个 C 链接

[复制链接]
发表于 2015-12-27 12:16:57 | 显示全部楼层 |阅读模式
20鱼币
1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(110): error C2733: “strcpy”: 不允许重载函数的第二个 C 链接
1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(107) : 参见“strcpy”的声明
怎么解决啊??

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2015-12-27 12:21:47 | 显示全部楼层
可以看一下你的代码吗?这个你写的参数是不是错了?多了一个或者少了一个
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2016-9-13 12:50:26 | 显示全部楼层
那应该是参数个数的问题, 查一下msdn
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2016-9-13 19:59:18 | 显示全部楼层
strcpy 基础使用:
  1. /* strcpy example */
  2. #include <stdio.h>
  3. #include <string.h>

  4. int main ()
  5. {
  6.   char str1[]="Sample string";
  7.   char str2[40];
  8.   char str3[40];
  9.   strcpy (str2,str1);
  10.   strcpy (str3,"copy successful");
  11.   printf ("str1: %s\nstr2: %s\nstr3: %s\n",str1,str2,str3);
  12.   return 0;
  13. }
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-17 16:12

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表