CArray | std::vector | |||||
GetSize() , GetCount() | size() | |||||
GetUpperBound() | ||||||
SetSize(newSize) | resize(newSize) | |||||
Add(element) | push_back(element) | |||||
Append(src) | insert(this->end(),src.begin(),src.end()) | |||||
InsertAt(index,element) | insert(this->begin()+index,element) | |||||
InsertAt(index,src) | insert(this->begin()+index,src.begin(),src.end()) | |||||
GetAt(0) | front() | |||||
GetAt(GetSize()-1) | back() | |||||
RemoveAt(index) | erase(this->begin()+index) | |||||
RemoveAll() | clear() | |||||
GetData() | data() , ? front() ? , &v[0] | |||||
CArray::GetCount() は,VC 7 で追加されたもの.
VC 6 にも対応するには GetSize() .
(VS)\VC\atlmfc\include\afxtempl.h より
template<class TYPE, class ARG_TYPE> AFX_INLINE INT_PTR CArray<TYPE, ARG_TYPE>::GetSize() const { return m_nSize; }
template<class TYPE, class ARG_TYPE> AFX_INLINE INT_PTR CArray<TYPE, ARG_TYPE>::GetCount() const { return m_nSize; }