文档详情

C++常见错误提示·调试详解.pptx

发布:2017-05-20约小于1千字共8页下载文档
文本预览下载声明
iostram: No such file or directory. 原因:头文件名写错 解决方法:检查头文件名是否正确;[Error] cin was not declared in this scope 原因: 没有加入头文件iostream或者没有using namespace std; 解决方法: 在代码开头加上#includeiostream和using namespace std; ;[Error] ‘s was not declared in this scope 原因:变量s没有定义 解决方法:在使用前定义变量s;[Error] expected } at end of input 原因:缺少一个花括号 解决方法:仔细检查每一个if语句和for/while/do while语句,找到正确的位置加上花括号;[Error] stray \243 in program 原因: 某些字符在中文输入法状态下输 解决方法: 切换输入法,切换到英文状态,重新输入;调试;单击行号设置断点;鼠标移动到变量名上,可以查看当前变量在内存中的值
显示全部
相似文档