| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 897 人关注过本帖
标题:linux系统下用gcc编译c++出错。初学者,请大家帮忙。
取消只看楼主 加入收藏
zengxiangze
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-3-30
结帖率:100%
收藏
已结贴  问题点数:10 回复次数:0 
linux系统下用gcc编译c++出错。初学者,请大家帮忙。
源代码是:
#include <iostream>
int main()
{float x;
int i;
x=3.6;
i=(int)x;
cout <<"x="<<x<<",i="<<i<< endl;
return 0;}

编译命令是:beibei@ubuntu:~/桌面$ gcc -Wall zeng.C -o zeng
可是出现下列错误:zeng.C:7: error: ‘cout’ was not declared in this scope
                               zeng.C:7: error: ‘endl’ was not declared in this scope

这是怎么个情况????
搜索更多相关主题的帖子: linux 源代码 
2011-03-30 18:02
快速回复:linux系统下用gcc编译c++出错。初学者,请大家帮忙。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011051 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved