The problem should be paid attention to when using the Carray template. # Include "afxtempl.h" in Head file.