我正在尝试在Linux中制作一些东西,但它抱怨它无法找到iostream.h.我需要安装什么来获取此文件?
此标准标题的正确名称iostream
没有扩展名.
如果您的编译器仍然无法找到它,请尝试以下操作:
find /usr/include -name iostream -type f -print
...按照编译器的文档将其添加到include路径中.
标头
#ifndef HEADER_IOSTREAM_H #define HEADER_IOSTREAM_H #includeusing namespace std; // Beware, this completely defeats the whole point of // having namespaces and could lead to name clashes; on the // other hand, code that still includes was // probably created before namespaces, anyway. #endif
虽然这与原始的过时标题不完全相同,但对于大多数用途来说这应该足够接近(即应该没有任何东西或者很少需要修复的东西).