c++构造函数
来源:互联网 发布:java 接口过滤器 编辑:程序博客网 时间:2024/05/16 17:34
#include <iostream>using namespace std;class Point{ int x,y;public: ***Point(int a,int b){}//:x(a),y(b){}// { x=a; y=b;}***void MovePoint( int a, int b){ x+=a; y+=b;this->x+=a;cout<<"this="<<this<<endl;}void print(){ cout<<"x="<<x<<" "<<this->x<<"y="<<y<<" "<<this->y<<endl;}};void main(){ Point point1( 10,10); point1.MovePoint(2,2); point1.print();}
1 0
- 【C++】拷贝构造函数
- C#:静态构造函数
- C++:拷贝构造函数
- explicit构造函数(C++)
- C++:关于构造函数
- C++-构造函数
- C++String构造函数
- c++-转换构造函数
- c++"拷贝构造函数
- C++: 拷贝构造函数
- object-c 构造函数
- C#构造函数
- objective-c 构造函数
- 【C++】构造函数
- 【C++】explicit构造函数
- 【C++】拷贝构造函数
- C++: 复制构造函数
- C++: 移动构造函数
- 可视化的数据结构 - 各种算法动画演示
- 机器学习之 EM算法
- C#成魔之路<14> 网络编程技术(3 )System.Net.Mail命名空间
- 搭建Hadoop集群
- leetcode 54. Spiral Matrix
- c++构造函数
- 即时通讯常用第三方库
- 属性动画中scale的时候设置旋转中心点
- JS技巧
- android基础之创建和解析xml
- 数据类型
- 多种多样的App主界面Tab实现方法(一):Viewpager
- 1074:ACM CLUB晚会
- Android四大组件之一ContentProvider