摘要: 对象成员指针实例化时,先调用嵌套构造函数,在构造line函数。 销毁对象时,先销毁嵌套构造函数coordinate,在销毁line函数,这个和嵌套对象成员函数不一样。 coordinate.h #pragma onceclass coordinate{public: coordinate(int x 阅读全文
posted @ 2017-11-23 23:14 boht 阅读(139) 评论(0) 推荐(0) 编辑
摘要: .h 文件 #pragma onceclass coordinate{public: coordinate(); ~coordinate();public: int m_ix; int m_iy; }; .cpp 文件 #include "stdafx.h"#include "coordinate. 阅读全文
posted @ 2017-11-23 21:37 boht 阅读(128) 评论(0) 推荐(0) 编辑