注册 登录
编程论坛 C++教室

求助:关于iostream.h与iostream的问题(新手)

m907341 发布于 2006-10-10 20:44, 1655 次点击
我用的是dev-c++
用#include<iostream.h>
时候报了一个警告:#warning This file includes at least one deprecated or antiquated header. \
Please consider using one of the 32 headers found in section 17.4.1.2 of the \
C++ standard. Examples include substituting the <X> header for the <X.h> \
header for C++ includes, or <iostream> instead of the deprecated header \
<iostream.h>. To disable this warning use -Wno-deprecated.

但是用#include<iostream>
又开始报cout没有声明!

怎么回事?
6 回复
#2
song42006-10-11 07:14

看看书

#3
踏魔狼2006-10-11 19:45

在#include<iostream>的下面加一行using namespace std;试试.

#4
makewelldone2006-10-13 13:22

在用时,在cin和cout前加上std.

#5
wfd20042008-01-27 08:50
总是提示无法找到iostream这个文件.
我用的是Visual Studio 2003
迷茫中...
#6
天使梦魔2008-01-27 10:21
去头文件目录下寻找这个文件,查看是否存在
#7
peach54602008-01-28 22:02
我只知道在我的VS2005里
使用
#include <iostream.h>
会报错,找不到头文件

楼主的程序
在引用头文件下加上
using namespace std;
就能运行了
1