Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
MFC
TRY
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CopyElements 

This function is called directly by CArray::Append and CArray::Copy.


template<class TYPE>
void AFXAPI CopyElements(
      TYPE* pDest,
   const TYPE* pSrc,
   INT_PTR nCount 
);

Parameters

TYPE

Template parameter specifying the type of elements to be copied.

pDest

Pointer to the destination where the elements will be copied.

pSrc

Pointer to the source of the elements to be copied.

nCount

Number of elements to be copied.

The default implementation uses the simple assignment operator ( = ) to perform the copy operation. If the type being copied does not have an overloaded operator=, then the default implementation performs a bitwise copy.

For information on implementing this and other helper functions, see the article Collections: How to Make a Type-Safe Collection.

Community Additions

ADD
Show:
© 2015 Microsoft