彩虹六号皮肤大全:C++的#include<>

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/14 04:04:40
C++中的预处理#include<iostream>和#include<iostream.h>对程序的运行有什么不同?
#include<iostream>后加using namespace std;
和直接用#include<iostream.h>在运行上有什么区别?

没有区别
#include<iostream.h>是早些时候的形式
最新的标准定义的是
#include<iostream>
using namespace std;

比如#include<math.h>变成
#include<cmath>
using namespace std;

#include<string.h>变成
#include<cstring>
using namespace std;

但在实际执行的时候没有区别
VC两者都兼容
但最好用新标准哦

第一个后面要加 using namespace std
我学到目前为止没发现什么不同