[转]fatal error: iostream.h: No such file or directory
iostream.h是非标准头文件,iostream是标准头文件形式。iostream.h时代没有名词空间,即所有库函数包括头文
件iostream.h都声明在全局域。为了体现结构层次,c++标准委员会引入了名词空间这一概念,并把所有库函数声
明由全局域改到了名词空间std。故而,
目前这两种头文件等价:
#include<iostream.h>
和
#include <iostream>
using namespace std;
(因为iostream声明在std中,故而要加上这句,除非你不用库函数,否则错误); 很多编译器都同时支持这两种头文件形式,更好的当然是标准头文件。至于为什么不废除非标准头文件,大概
是为了兼容以前的代码吧。 还有一点在标准c++中,所有库函数都没有.h后缀了,如果是c语言的库函数,则去掉后缀,并在开头加上一个c
(如,c++的string.h变为string,c语言的stdio.h,变为cstdio,c语言的string.h变为cstring等等)。
reference:
http://blog.chinaunix.net/uid-26696487-id-3151002.html
[转]fatal error: iostream.h: No such file or directory的更多相关文章
- plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
装一台新服务器环境的时候,装uwsgi报错: plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or di ...
- [lua]luasocket.c:20:17: fatal error: lua.h: No such file or directory
安装luasocket的时候出现了如下的错误 问题 $ tar xzf luasocket-2.0.2.tar.gz $ cd luasocket-2.0.2 $ $ make cd src; mak ...
- Solve fatal error: helper_math.h: No such file or directory
When the 'fatal error: helper_math.h: No such file or directory' occurs, it means the 'helper_math.h ...
- qingstor python-sdk 安装错误 src/MD2.c:31:20: fatal error: Python.h: No such file or directory
ubuntu安装python qingstor-sdk, src/MD2.c:31:20: fatal error: Python.h: No such file or directory compi ...
- Ubuntu下 fatal error: Python.h: No such file or directory 解决方法
参考: fatal error: Python.h: No such file or directory Ubuntu下 fatal error: Python.h: No such file or ...
- tesseract编译错误:fatal error: allheaders.h: No such file or directory
错误描述: globaloc.cpp::: fatal error: allheaders.h: No such file or directory #include "allheaders ...
- 解决 Boost安装:fatal error: bzlib.h: No such file or directory 问题
参考: How to install all the boost development libraries? 解决 Boost安装:fatal error: bzlib.h: No such fil ...
- caffe编译问题-src/caffe/net.cpp:8:18: fatal error: hdf5.h: No such file or directory compilation terminated.
错误描述 src/caffe/net.:: fatal error: hdf5.h: No such : recipe 操作过程 step1: 在Makefile.config文件更改INCLUDE_ ...
- /usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory
cc -DDEBUG -mtune=core2 -O2 \ -onvideo nvideo.c \ -I/usr/include/atk-1.0 \ -I/usr/include/cairo \ -I ...
随机推荐
- C语言--位运算符
一.位运算符 1.按位与:& 1> 功能 * 只有对应的两个二进制位为1时,结果位才为1,否则为0 * 举例:10用二进制表示为1010, 7用二进制表示为0111.对两个数值进行&a ...
- 设置Ubuntu Mysql可以远程链接
1:修改my.cnf配置文件 $sudo vim /etc/mysql/my.cnf 修改为: bind-address = 0.0.0.0 2:进行授权操作 mysql> grant all ...
- C语言---类型转换
itoa 功 能:把一整数转换为字符串 用 法:char *itoa(int value, char *string, int radix); 详细解释:itoa是英文integer to array ...
- bzoj1750 [Usaco2005 qua]Apple Catching
Description It is a little known fact that cows love apples. Farmer John has two apple trees (which ...
- Nim Game 解答
Question You are playing the following Nim Game with your friend: There is a heap of stones on the t ...
- Linux下如何选择文件系统:EXT4、Btrfs 和 XFS
老实说,人们最不曾思考的问题之一是他们的个人电脑中使用了什么文件系统.Windows 和 Mac OS X 用户更没有理由去考虑,因为对于他们的操作系统,只有一种选择,那就是 NTFS 和 HFS+. ...
- 12 个 Linux 进程管理命令介绍
执行中的程序在称作进程.当程序以可执行文件存放在存储中,并且运行的时候,每个进程会被动态得分配系统资源.内存.安全属性和与之相关的状态.可以有多个进程关联到同一个程序,并同时执行不会互相干扰.操作系统 ...
- The Frog's Games(二分)
The Frog's Games Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) ...
- uva 11210 Chinese Mahjong(暴力搜索)
Chinese Mahjong Mahjong () is a game of Chinese origin usually played by four persons with tiles res ...
- 在多线程环境中使用Jedis
Jedis是一个Java语言的Redis客户端,它为Java语言连接与操作Redis提供了简单易用的接口. Jedis不是线程安全的.故不应该在多线程环境中共用一个Jedis实例.可是.也应该避免直接 ...