唉,唉,唉,还是这个老问题
xf166 2002-05-07 06:45:23 昨天在这里发如何理解,
====================
typedef CList<CRect, CRect> CListRect;
====================
得到了afsfop等老兄热心的帮助,之后我是这么理解的,
typedef A B
MSDN中这理解typedef :
The typedef keyword defines a synonym for the specified type-declaration.
看之后,我理解是把A种类型定义成意义更鲜明的新类型B
这里我的问题出来了,==》怎么理解 CList<CRect, CRect> ???
MSDN中这解释CList :
The CList class supports ordered lists of nonunique objects accessible sequentially or by value. CList lists behave like doubly-linked lists.
template< class TYPE, class ARG_TYPE >class CList : public CObject
是否这么理解呢:
以CRect成员类型的CList类型,重定义新类型CListRect
以后假如做了以下定义:
CRect rectWnd; //声明区域对象
GetWindowRect(&rectWnd);
//MSDN: address of structure window coordinates
listRect.AddTail(&rectWnd); //为listRect,添加入"新值"
不知道我理解得对不,希望得到热心人指点。
不理解透实在不爽,所以来问了,·_·.
========================================
http://as99.126.com/
========================================