如下,如果使用老的输入输出流进行编译时就会发现报错
示例代码
编译后就会发现在报“cout”: 未声明的标识符类似的错误
此时做如下修改即可
1、将#include <iostream.h>非标准输入输出流修改为#include <iostream>的标准输入输出流
2、在开头添加引号内的内容“using namespace std;"以使用标准名称空间
做好以上两个修改后,编译可通过
如下,如果使用老的输入输出流进行编译时就会发现报错
示例代码
编译后就会发现在报“cout”: 未声明的标识符类似的错误
此时做如下修改即可
2、在开头添加引号内的内容“using namespace std;"以使用标准名称空间
做好以上两个修改后,编译可通过