奇怪的 error C2143: syntax error : missing ';' before 'type'
来源:互联网 发布:配音软件 编辑:程序博客网 时间:2024/05/21 19:34
代码:
int x = 6;
if (bFlag)
x = 8;
int y = 6;
VS2005编译报错: error C2143: syntax error : missing ';' before 'type'
报错位置: int y = 6;
去掉 if(bFlag)
x = 8;
编译成功,这不应该啊,没有语法错误。
最后去掉 int y = 6;中的 int编译通过。
给出的解释:
In Microsoft C, compiler errors C2143 and C2144 are defined as follows:
C2143: syntax error : missing 'token1' before 'token2'
C2144: syntax error : missing 'token' before type 'type'
C2144: syntax error : missing 'token' before type 'type'
You may receive this error message if your program places executable code before a data declaration, an acceptable practice in Kernighan-and-Ritchie C. This practice has been outlawed in later versions of the ANSI drafts.
This error message will normally occur if a required closing curly brace (}), right parenthesis [)], or semicolon (;) is missing.
- 奇怪的 error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing \';\' before \'type\'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type' in Visual C++
- VC6.0 error C2143: syntax error : missing ';' before 'type'。。
- 【VC6.0】error C2143: syntax error : missing ';' before 'type'
- C语言 error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before '*'问题
- error C2143: syntax error : missing ';' before '*....
- error C2143: syntax error : missing ';' before '*.... 解决...
- error C2143: syntax error : missing ')' before '*'
- error C2143: syntax error : missing ';' before '*'
- 灰色div+css导航菜单栏代码
- 单精度和双精度
- Android-vold源码分析之卸载SD卡(9)
- Android-vold源码分析之格式化SD卡(10)
- ANSI C标准文件IO操作
- 奇怪的 error C2143: syntax error : missing ';' before 'type'
- 我老师教的非常简洁的javascropt日历Js
- 深入分析 Java I/O 的工作机制
- c# SerialPort控件串口通信 收藏
- 普通html中<form>标签和struts2中<s:form>标签action属性的不同
- 第八周实验报告1.2
- 第一篇,起点or终点
- Android中,SD卡上的媒体文件(图片、视频)的改变与通知
- 安卓Android开发视频培训材料介绍 Video2Brain Android 2