以前使用STL时,vector只有一个类型参数即数组元素类型,而在VC中使用CAarry,CList时,有两个类型参数
templete <class TYPE,class ARG_TYPE> calss CArray:public CObject
请问这两的个参数 的含义及这样有什么好处?
多谢!

解决方案 »

  1.   

    template< class TYPE, class ARG_TYPE > class CArray : public CObjectParametersTYPETemplate parameter specifying the type of objects stored in the array. TYPE is a parameter that is returned by CArray.ARG_TYPETemplate parameter specifying the argument type used to access objects stored in the array. Often a reference to TYPE. ARG_TYPE is a parameter that is passed to CArray.