一个c++代码怎么老出错啊,
#include <iostream>
class point
{private:
int x,y;
public:
point(int xx=0,int yy=0)
{x=xx;
y=yy;
cout < <"构造函数被调用" < <endl;
}
point(point &p);
~point(){cout < <"析构函数被调用" < <endl;}
int get_x(){return x;}
int get_y(){return y;}
};
point::point(point &p)
{x=p.x;
y=p.y;
cout < <"拷贝函数被调用" < <endl;
}
void main()
{point a(12,22)
point b(a);
cout < <b.get_x() < <"" < <b.get_y() < <endl;
}
class point
{private:
int x,y;
public:
point(int xx=0,int yy=0)
{x=xx;
y=yy;
cout < <"构造函数被调用" < <endl;
}
point(point &p);
~point(){cout < <"析构函数被调用" < <endl;}
int get_x(){return x;}
int get_y(){return y;}
};
point::point(point &p)
{x=p.x;
y=p.y;
cout < <"拷贝函数被调用" < <endl;
}
void main()
{point a(12,22)
point b(a);
cout < <b.get_x() < <"" < <b.get_y() < <endl;
}
...全文
相关推荐
libstdc-.6.0.9-master.zip
当你运行React Native iOS 端 老项目的时候你发现项目报错了那么你可能需要这个,它分为两个版本,一个是真机,一个是模拟器。
小熊猫Dev-Cpp超好用
超好用小熊猫devc++,可以ege、graphcs.h,还能自动补全与自动编译等!!!
C++入门经典代码 cpp
C++入门经典代码 C++入门经典代码 C++入门经典代码 C++入门经典代码
MFC制作ActiveX控件,解决了在实际使用中提示winocc.cpp出错的问题
基于VC6.0 MFC制作的ActiveX控件,解决了在使用时提示winocc.cpp中的问题。
c++程序运行出错问题处理
可以解决c++某些程序运行出错的问题 可以解决c++某些程序运行出错的问题 可以解决c++某些程序运行出错的问题 可以解决c++某些程序运行出错的问题


