LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 498|回复: 4

求教

[复制链接]
发表于 2004-11-10 09:04:32 | 显示全部楼层 |阅读模式
我在我的目录下用c语言编了个小程序.为什么编译时说没有找到iostream.h文件
我带了头文件的 ,高手帮我 看一下
谢谢了
发表于 2004-11-10 09:14:52 | 显示全部楼层

you may

use
#include <iostream>
instead
 楼主| 发表于 2004-11-10 09:32:35 | 显示全部楼层
还是不行
这样显示的
test.c: In function `main':
test.c:5: `cout' undeclared (first use in this function)
test.c:5: (Each undeclared identifier is reported only once
test.c:5: for each function it appears in.)
test.c:5: `endl' undeclared (first use in this function)
test.c:3: warning: return type of `main' is not `int'
发表于 2004-11-10 09:37:24 | 显示全部楼层

这是namespace 的问题

#include <iostream>
using namcespace std;

最好找本c++的书看看
 楼主| 发表于 2004-11-10 09:47:10 | 显示全部楼层
那我再看看 了 ,谢谢了 呵呵
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表