LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 626|回复: 2

can you help me about c++?

[复制链接]
发表于 2003-5-4 18:59:46 | 显示全部楼层 |阅读模式
#include <iostream.h>
void main ()
{
cout <<"I am a student.\n";
}
[root@localhost root]# g++ /exercise/ch1_1.cpp
In file included from /usr/include/c++/3.2.2/backward/iostream.h:31,
                 from /exercise/ch1_1.cpp:1:
/usr/include/c++/3.2.2/backward/backward_warning.h:32:2: warning: #warning This
file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples
include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning
use -Wno-deprecated.
/exercise/ch1_1.cpp:3: `main' must return `int'
What's wrong?What can I do? Can you give me more information about c++.Thanks!
Sorry, There is something wrong in my RedHat linux 9. I can't use Chinese!;)
发表于 2003-5-4 21:42:59 | 显示全部楼层
#include <iostream>

using namespace std;

int
main ()
{
cout <<"I am a student.\n";

return 0;
}
多看看以前的帖子
 楼主| 发表于 2003-5-4 22:36:32 | 显示全部楼层
谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表