CStringArray list; for (int i = 0; i < list.GetSize(); i++) { // Get the current string CString str = list.GetAt(i); // Another way CString str = list[i]; }
Programming Tips - MFC: Iterate thru a CStringArray
Date: 2018dec5
Framework: MFC
Language: C++
Keywords: enumerate
Q. MFC: Iterate thru a CStringArray
A. This class has no iterator like the standard template library.
Just do this: