Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CObArray::GetAt
CObArray                                    Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  CObject* GetAt( int nIndex ) const;
 
  Parameter   Description
 
  <nIndex>    An integer index that is greater than or equal to 0 and less
              than or equal to GetUpperBound().
 
  Remarks
 
  Returns the array element at the specified index.
 
  Return Value
 
  The CObject pointer element currently at this index; NULL if no element
  is stored at the index.
 
  Example
 
  CObArray array;
 
  array.Add( new CAge( 21 ) ); // Element 0
  array.Add( new CAge( 40 ) ); // Element 1
  ASSERT( *(CAge*) array.GetAt( 0 ) == CAge( 21 ) );
 
 
  See Also
 
  CObArray::SetAt, CObArray::operator []
 
 
                                     -♦-