Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在尝试将 iostream 导入自定义块,我添加了该行
#include <iostream.h>
在 .h 文件和 .cc 文件中,但出现错误:
致命错误:iostream.h:没有这样的文件或目录
标题iostream是<iostream>,不是<iostream.h>。您收到的错误表明编译器正在寻找iostream.h,这表明您可能包含了错误的标头。
iostream
<iostream>
<iostream.h>
iostream.h
尝试将标题更改为<iostream>,看看是否可以解决问题。更一般地,请确保您不包含任何.h以
.h
希望这可以帮助!