C++中为了避免名字定义冲突,特别引入了“名字空间的定义”,即namespace。
当代码中用<iostream.h>时,输出可直接引用cout<<x;
//<iostream.h>继承C语言的标准库文件,未引入名字空间定义,所以可直接使用。
使用<iostream>时,引入std::有以下方法:1. using namespace std; cout<<x;
==========================================
stdio.h是C语言的东西,输入输出是这样的printf(...);,scanf(...); iostream.h是C++的东西,输入输出是这样的cout<<....;,cin>>.....;