程序小问题

[复制链接]
2399|4
 楼主| ershisi 发表于 2010-4-18 22:58 | 显示全部楼层 |阅读模式
#include<iostream.h>
void hello2()
{
cout<<"hello,world,mk ii"<<endl;
}

void hello()
{
cout<<"hello,world!"<<endl;
hello2();
}
void main()
{
cout<<"main function"<<endl;
hello();
hello2();
}
这个程序不对吗?哪里错了?请高手指点!
原野之狼 发表于 2010-4-19 00:15 | 显示全部楼层
看不出什么错误
不知道你在什么平台下运行这个程序
还有main函数运行完就退出了
hondephy 发表于 2010-4-20 13:07 | 显示全部楼层
按语法,没错
lxyppc 发表于 2010-4-20 14:00 | 显示全部楼层
znmcu 发表于 2010-4-20 14:07 | 显示全部楼层
如果你以C的形式来编译,而没有以cpp的形式来编译,就肯定有问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

413

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部