Description: When we use vc for more complex programming, we often need to use complex array structures and hope to achieve dynamic management. Because c ++ does not support dynamic arrays, MFC provides a CArray class to implement dynamic array functionality. The effective use of the CArray class can improve the efficiency of the program.
MFC provides a template library to implement some of the more common data structures such as Array,List, Map. CArray is one of them to implement the function of a dynamic array.
CArray is derived from CObject, with two template parameters, the first parameter is the variable type of the CArray class element, and the second one is the parameter type of the function call.
We have a class class Object, and we want to define a dynamic array of objects, so we can use these two methods
File list (Check if you may need any files):