使用gcc编译c++文件出错
发表于 : 2009-03-15 22:25
我的系统是ubuntu8.10,刚装了没多久,以前都是在windows下编程的,没怎么用过gcc,我写完代码如下
#include<iostream>
using namespace std;
int main()
{
cout << "hello world!" << endl;
return 0;
}
保存为hello.c,然后在终端下运行:gcc -o hello hello.c,错误提示如下:
iostream:没有该文件或目录
cout未声明
endl未声明
是不是我的gcc没有安装好呀?请各位帮忙,谢谢!
#include<iostream>
using namespace std;
int main()
{
cout << "hello world!" << endl;
return 0;
}
保存为hello.c,然后在终端下运行:gcc -o hello hello.c,错误提示如下:
iostream:没有该文件或目录
cout未声明
endl未声明
是不是我的gcc没有安装好呀?请各位帮忙,谢谢!