[转]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 ...
随机推荐
- jQuery代码片段
禁用页面右键菜单 $(document).bind('contextmenu', function(){ return false; }); 浏览器判断 $.browser.version $.bro ...
- IOS 保存图片至相册
IOS 保存图片至相册 应用中有时我们会有保存图片的需求,如利用UIImagePickerController用IOS设备内置的相机拍照,或是有时我们在应用程序中利用UIKit的 UIGraphi ...
- apache window环境下本地配置虚拟主机
1.在httpd.conf中去掉如下注释: # Virtual hostsInclude conf/extra/httpd-vhosts.conf 2.在 httpd-vhosts.conf添加内容 ...
- 在win7与XP系统下 C#缺省路径不同
当我们加载文件时,若只输入文件名,在WIN7下默认是主程序所在文件夹路径 在XP下是上次本程序游览的有效路径 所以以后程序中尽量避免只传文件名
- haproxy 负载elasticsearch 切换
Attempted to send a bulk request to Elasticsearch configured at '["http://192.168.32.152:9200&q ...
- SharePoint excel service web part 连接到 filter web part
本文讲述SharePoint excel service web part 连接到 filter web part的一个简单应用场景. SharePoint excel service web par ...
- c++之 数组
数组的定义 数组用于表示一组数值,例如: char arr[5]; 其中,arr称为"数组变量",简称"数组".它表示5个char型数据,我们把每一个数据称为一 ...
- maven 工作原理和添加jar包技巧
相 信只要做过 Java 开发的童鞋们,对 Ant 想必都不陌生,我们往往使用 Ant 来构建项目,尤其是涉及到特别繁杂的工作量,一个 build.xml 能够完成编译.测试.打包.部署等很多 ...
- 虚拟机IOS开发环境搭建教程
来源:http://www.cnblogs.com/xiaoyaoju/archive/2013/05/21/3091171.html 安装条件: 硬件:一台拥有支持虚拟技术的64位双核处理器和2GB ...
- C函数的实现(strcpy,atoi,atof,itoa,reverse)
在笔试面试中经常会遇到让你实现C语言中的一些函数比如strcpy,atoi等 1. atoi 把字符串s转换成数字 int Atoi( char *s ) { int num = 0, i = 0; ...