设为首页
收藏本站
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
平台
Portal
论坛
BBS
文库
项目
群组
Group
我的博客
Space
搜索
搜索
热搜:
shell
linux
mysql
本版
用户
LinuxSir.cn,穿越时空的Linuxsir!
»
论坛
›
编程开发讨论区 —— LinuxSir.cn
›
Linux 程序设计专题讨论
›
关于#include <iostream.h>请教
1
2
/ 2 页
下一页
返回列表
查看:
2164
|
回复:
17
关于#include <iostream.h>请教
[复制链接]
spate
spate
当前离线
积分
15
IP卡
狗仔卡
发表于 2004-3-11 12:04:26
|
显示全部楼层
|
阅读模式
我的程序是这样的:
#include <iostream.h>
main()
{
int a,b,c;
a=5;
b=2;
c=a+b;
printf(c);
}
gcc的时候出现找不到iostream.h文件,printf不能使用
请问是什么问题。
我刚开始学linux-c,谢谢。
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
显身卡
dancingpig
dancingpig
当前离线
积分
1525
IP卡
狗仔卡
发表于 2004-3-11 13:22:49
|
显示全部楼层
看看/usr/include下面有这个h文件么
回复
支持
反对
使用道具
举报
显身卡
jsjxiang
jsjxiang
当前离线
积分
50
IP卡
狗仔卡
发表于 2004-3-11 14:36:07
|
显示全部楼层
用#include <stream>吧,用g++编译
回复
支持
反对
使用道具
举报
显身卡
spate
spate
当前离线
积分
15
IP卡
狗仔卡
楼主
|
发表于 2004-3-11 15:25:02
|
显示全部楼层
my program is:
#include <stdio.h>
void main()
{
int a,b,c;
a=5;
b=2;
c=a+b;
printf("ok"+a);
}
using gcc or g++ compile, there is no error, but no output, i expect the result that is "ok7", why not?
回复
支持
反对
使用道具
举报
显身卡
fingster
fingster
当前离线
积分
900
IP卡
狗仔卡
发表于 2004-3-11 16:34:21
|
显示全部楼层
printf("ok%d",c);
回复
支持
反对
使用道具
举报
显身卡
spate
spate
当前离线
积分
15
IP卡
狗仔卡
楼主
|
发表于 2004-3-11 16:47:02
|
显示全部楼层
i do that, but there is not a output all the same.
回复
支持
反对
使用道具
举报
显身卡
spate
spate
当前离线
积分
15
IP卡
狗仔卡
楼主
|
发表于 2004-3-11 16:53:52
|
显示全部楼层
I know "gcc" is compile order, is it also the running order? if there is running order to run the *.out file to show the output.
回复
支持
反对
使用道具
举报
显身卡
dancingpig
dancingpig
当前离线
积分
1525
IP卡
狗仔卡
发表于 2004-3-11 17:06:16
|
显示全部楼层
楼上的,我英文不很好不知道有没有看错意思哈
gcc是编译命令
比如要编译test.c文件
gcc test.c -o test
输出文件是test
在目录下应该看到test这个文件
然后./test
就可以了
回复
支持
反对
使用道具
举报
显身卡
microyzy
microyzy
当前离线
积分
16
IP卡
狗仔卡
发表于 2004-3-11 18:49:16
|
显示全部楼层
printf("ok%d",a);
...
回复
支持
反对
使用道具
举报
显身卡
devel
devel
当前离线
积分
1472
IP卡
狗仔卡
发表于 2004-3-11 19:21:02
|
显示全部楼层
iostream.h under the this is directory:
/usr/include/g++-3/
回复
支持
反对
使用道具
举报
显身卡
下一页 »
1
2
/ 2 页
下一页
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
浏览过的版块
硬件设备 Linux 驱动
Redhat/Fedora/CentOS Linux
LFS(LinuxfromScratch)
Archlinux讨论区
Copyright © 2002-2023
LinuxSir.cn
(http://www.linuxsir.cn/) 版权所有 All Rights Reserved.
Powered by
RedflagLinux!
技术支持:
中科红旗
|
京ICP备19024520号
快速回复
返回顶部
返回列表