C语言报错

C语言报错集锦
1.“strcpy_s”: 用于调用的参数太少
vs2019截图
可以看出,这个函数需要传递三个参数,分别是目的字符串首地址, 目的地址的大小, 原字符串的首地址
完美运行
贴一个大佬的链接:https://www.cnblogs.com/hi3254014978/p/9721181.html
2.Run-Time Check Failure #2 - Stack around the variable ‘a’ was corrupted
数组a越界
贴:https://blog.csdn.net/chenyujing1234/article/details/8261914

3.提示error:表达式必须包含指向对象的指针类型
(在a[i]处的i)# include <>int main (){ int a,a[11]={13}
原因:变量名重复
贴:https://wenwen.19yxw.com/c/2485057.html

4… this statement, but the latter is misleadingly indented as if it were guarded by the’ if’
原因:在不该有分号的地方标上分号了,导致没有对应的if
C语言报错_第1张图片

你可能感兴趣的:(C语言,报错)