弱弱的问一下
我在linux下编程,在那个vi编辑器里面编写c代码的话头文件#include《stdio.h》,能编译通过的,本人习惯c++,然后把头文件换成#include《iosream》 using namespace std; 为什么编译就报错了,报错是说这个头文件不存在,那么gcc下c++的头文件是什么呢,哪有这方面的资料,求指点,感激涕零
#include <iostream.h> int main() { cout<<"hello\n"<<endl; return 0; }然后就这样了
wog@wog-Aspire-5542:~$ g++ c.C c.C:1: fatal error: iostream.h: 没有那个文件或目录 compilation terminated.
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)加了-Wno-deprecated也没用
#include <iostream> //不要用iostream.h using namespace std; int main() { cout<<"hello\n"<<endl; return 0; }
编译 g++ c.C -o c 运行 c
/usr/bin/ld: cannot open output file c: Is a directory collect2: ld returned 1 exit status