怎样使VC6.0严格按照标准C语法进行编译?

来源:百度知道 编辑:UC知道 时间:2024/09/21 22:42:30
怎样使VC6.0严格按照标准C语法进行编译?
就是输入头文件#include <stdio.h>时,编译器认为你的编写是正确的,输入头文件#include<iostream> 时,编译器就报错?

iostream.h是包含输入/输出流处理的头文件,iostream就什么都不是了
但用iostream要加名词空间namespace

#include<iostream.h>
或者是
#include<iostream>
using namespace std;
二者都行

#include<iostream.h>是C语言中比较通用的
#include<iostream>
using namespace std;
是C++中比较通用的

vs2008

应该有.h后缀吧。报的什么错误?

我的是vc 6.0 啊。编译器会提示你 iostream 是c++ 里面的

把不是c语法的头文件都删了呗....