#include <afxwin.h> #include "resource.h" #include <afxtempl.h> //定义模板类的头文件 class MyDocument : public CDocument { public: CArray<CPoint,CPoint &> pArray;//<保存的数据类型,读取保存数据类型的返回值> void AddPoint(CPoint p) { pArray.Add(p); } CPoint GetPoint(int i) {