VS2005编译C语言程序
来源:互联网 发布:unity3d 5.0教程 编辑:程序博客网 时间:2024/04/28 07:13
用VS2005编译如下代码:
void main()
{printf("Hello World!");
int a;
scanf("%d",&a);
这样会报错:error C2143: syntax error : missing ';' before 'type'
vs2005和eclipse的区别在于eclipse可以通过。
void main()
{
int a;
printf("Hello World!");
scanf("%d",&a);
只要把int a; 放到第一行就可以编译通过了。网上查了下,原因如下:
"microsoft C compiler wants all variables declared at top of function",
This is what C89 defines. C99 allows variable declarations also in the middle of a function.
The problem is you are using a C file. This means the compiler implements strict C rules. If you change your source file to a cpp type file, you will use the C++ compiler which is myuch more flexible
- VS2005编译C语言程序
- vs2005下编译c语言程序
- VS2008编译C语言程序
- gcc编译c语言程序
- C语言程序编译过程
- c语言程序编译过程
- VS2005编译Xalan-C
- C语言:分步编译一个C程序
- C语言编程程序编译全过程剖析
- Android-------C语言可执行程序编译实例
- vim使用F5编译C语言程序
- c语言程序的编译过程
- C语言程序编译过程 2
- c语言程序编译执行全过程
- Android-------C语言可执行程序编译实例
- C语言编程程序编译全过程剖析
- 在VS2012中编译C语言程序
- C语言程序编译的内存分配:
- MFC 中的设计模式分析
- Hibernate里sessionFactory的openSession()和getCurrentSession()的区别
- 国外WiFi资费
- 如何编译OpenCV-2.3.x/OpenCV-2.4.x使其支持GPU-CUDA高速运算?
- Mac mini安装内存条和Xcode安装
- VS2005编译C语言程序
- Linux系统中关于文件编码以及编码的转换
- android 打电话的例子
- Sql生成表名实体类
- ARM-交叉编译器各版本的区别
- java 网络编程【7】 如何检测和解决端口冲突问题?
- 【java&数据库】写冰川立方体中遇到的问题及解决
- Android中当Logcat记录不到程序运行信息时,如何让Logcat重新工作?
- sfsefsefsefsefsefse