我使用GCC 4.6.3:致命错误:iostream.h:没有这样的文件或目录
[email protected]:~$ g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
我的计划会导致以下编译错误:
[email protected]:~$ g++ ArrayInput.cpp
ArrayInput.cpp:1:21: fatal error: iostream.h: No such file or directory
如何解决它?
通常要使用''包括。也许他们已经在默认包含路径? –
解决问题并重新编译我得到这个错误: - gourab @ gourab-RV509:〜$ g ++ ArrayInput.cpp ArrayInput.cpp:在函数'int main()': ArrayInput.cpp:5:2:error: 'cout'未在此范围内声明 ArrayInput.cpp:5:2:note:建议的替代方案: /usr/include/c++/4.6/iostream:62:18:note:'std :: cout' ArrayInput。 cpp:8:5:error:'cin'未在此范围内声明 ArrayInput.cpp:8:5:note:建议的替代方案: /usr/include/c++/4.6/iostream:61:18:note:' std :: cin' –
@ grv.giit您正在使用哪本书? – asheeshr