网站首页  计算机词典

请输入您要查询的字词:

 

字词 CObArray::GetUpperBound
释义 CObArray::GetUpperBound

int GetUpperBound( ) const;

返回值:返回以0为基数的上界的索引。

说明:
返回该数组的当前上界。由于数组索引以0为基数,那么该函数返回值将比GetSize返回值小1。
条件 GetUpperBound( ) ==1指出的是数组没有元素。
下表列出了类似于CObArray::GetUpperBound函数的其它成员函数。
类成员函数
CByteArrayint GetUpperBound( ) const;
CDWordArrayint GetUpperBound( ) const;
CPtrArrayint GetUpperBound( ) const;
CStringArrayint GetUpperBound( ) const;
CUIntArrayint GetUpperBound( ) const;
CWordArrayint GetUpperBound( ) const;

示例:
请参阅CObList::CObList,了解所有收集示例中使用的CAge类。
// example for CObArray::GetUpperBound
CObArray array;
array.Add( new CAge( 21 ) ); // Element 0
array.Add( new CAge( 40 ) ); // Element 1
ASSERT( array.GetUpperBound() == 1 ); // Largest index

请参阅:CObArray::GetSize, CObArray::SetSize
随便看

 

计算机英汉双解词典包含34412条计算机术语英汉翻译词条,基本涵盖了全部常用计算机术语的翻译及用法,是计算机学习及翻译工作的有利工具。

 

Copyright © 2021-2025 foosec.com All Rights Reserved
更新时间:2026/10/23 20:45:38