文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>CStringArray in mfc

CStringArray in mfc

时间:2010-09-27  来源:mpandar

msdn介绍:支持CString对象的数组,应用类似于CObArray类,所有类似的类如下

CByteArray

CByteArray( );

CDWordArray

CDWordArray( );

CPtrArray

CPtrArray( );

CStringArray

CStringArray( );

CUIntArray

CUIntArray( );

CWordArray

CWordArray( );

构造方式

CObArray arr; //Array with default blocksize
CObArray* pArray = new CObArray;


大体通用函数:

GetCount
  获取数组中所有元素个数
 
GetSize
  同上吧
 
GetUpperBound
 Returns the largest valid index.
 
SetSize
 Sets the number of elements to be contained in this array.
 
FreeExtra
 Frees all unused memory above the current upper bound.
 
RemoveAll
  清空整个数组
 
ElementAt
 Returns a temporary reference to the element pointer within the array.
 
GetAt
 Returns the value at a given index.
 
GetData
 Allows access to elements in the array. Can be NULL.
 
SetAt
 Sets the value for a given index; array not allowed to grow.
 
Add
  在数组的末尾添加一个元素,如果有必要它会自动增长
 
Append
 Appends another array to the array; grows the array if necessary.
 
Copy
 Copies anolther array to the array; grows the array if necessary.
 
SetAtGrow
 Sets the value for a given index; grows the array if necessary.
 
InsertAt
 Inserts an element (or all the elements in another array) at a specified index.
 
IsEmpty
  测试数组是否为空
 
RemoveAt
 Removes an element at a specific index.
 

msdn上有太详细的介绍了,再说就是废话了!
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载