- 博客(4)
- 收藏
- 关注
原创 将第二个字符串的内容复制到第一个字符串
标题将第二个字符串的内容复制到第一个字符串 斜体样式自己编写tircpy函数 #include<stdio.h> #include<string.h> #define N 5 void mytircpy(char a[], char b[]) { int i=0; while (b[i] != 0) { a[i] = b[i]; i++; } } int main(void) { char a[N], b[N], c[N]; printf("请输入第一个字符串:"
2020-12-12 15:23:42
903
转载 Run-Time Check Failure #2 - Stack around the variable ‘xxx‘ was corrupted 的解决方法
Run-Time Check Failure #2 - Stack around the variable ‘xxx’ was corrupted 的解决方法 Run-Time Check Failure #2 - Stack around the variable ” was corrupte 意思我们的程序中,在某个变量附近的内存被破坏了,如果出现此类问题,一般表示我们的程序存在内存越界。 解决方法: 假如你的这块程序中,有数组操作,不妨先屏蔽掉,看是否还会出现此类问题。 然后,再仔细做类型检查咯。
2020-12-12 15:20:30
4065
1
原创 return 0;函数引出main函数的规范
标题由return 0;函数引出main函数的规范 #include<stdio.h> #include<string.h> #define N 20 int main(void) { ... return ; } 此时报错: 错误 C2561 “main”: 函数必须返回值 输入十个字符串,求最小的字符串 原因在于return 后缺少返回值0。 在C语言中,主bai函数必须要有返回值,既然有时会出错话有必要加return 0;吗? 当然有! main 函数的返回值类型必须
2020-12-12 11:53:04
1072
转载 VS2019报错:严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C4996 ‘strcpy‘: This function or variable may be unsafe. Consid
标题VS2019报错:严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C4996 ‘strcpy’: This function or variable may be unsafe. Consid VS2019报错:严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C4996 ‘strcpy’: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, us
2020-12-12 11:34:12
2790
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅