注册 登录
编程论坛 新人交流区

[求助].编译不能过

zxh321 发布于 2007-10-30 19:50, 211 次点击

#include<iostream.h>
//struct Point
class Point
{
public:
int x;
int y;
/* void init()
{
x=0;
y=0;
}*/
Point()
{
x=0;
y=0;
}
Point(int a,int b)
{
x=a;
y=b;


}
~Point()
{
}
void output()
{
cout<<x<<endl<<y<<endl;
}
};
void main
{
Point Pt(3,4);
//Pt.x=5;
//Pt.y=5;
//cout<<Pt.x<<endl<<Pt.y<<endl;
// Pt.init();
Pt.output();


}

2 回复
#2
killer_l2007-10-30 21:05
void main()
#3
cduedu2007-10-30 21:10
回复:(zxh321)[求助].编译不能过

我刚才发错了

[此贴子已经被作者于2007-10-30 21:11:38编辑过]

1