複製鏈接
請複製以下鏈接發送給好友

GetLength

鎖定
getlength是數組的屬性,獲得數組的長度。參數為0或1。
外文名
GetLength
所屬學科
計算機

目錄

GetLength程序特點

CFile::GetLength
virtual DWORD GetLength( ) const;
throw( CFileException );
Return Value
該文件的長度。
Remarks
獲得當前字節文件的邏輯長度,而不是數量。

GetLength應用

Example
The following example demonstrates the use of CString::GetLength.
// example for CString::GetLengthCString s( "abcdef" );ASSERT( s.GetLength() == 6 );CString::GetLength
int GetLength( ) const;
返回值:返回字符串中的字節計數。
説明:
此成員函數用來獲取這個CString對象中的字節計數。這個計數不包括結尾的空字符。
對於多字節字符集(MBCS),GetLength按每一個8位字符計數;即,在一個多字節字符中的開始和結尾字節被算作兩個字節。
示例:下面的例子説明了如何使用CString::GetLength。
// CString::GetLength示例:
CString s( "abcdef" );
ASSERT( s.GetLength() == 6 );