// Define myList. CList<CString,CString&> myList;// Add two elements to the list. myList.AddHead(CString("ABC")); myList.AddHead(CString("123"));// Dump the list elements to the debug window. POSITION pos = myList.GetHeadPosition(); for (int i=0;i < myList.GetCount();i++) { TRACE("%s\r\n", (LPCSTR) myList.GetNext(pos)); }
CList<CString,CString&> myList;// Add two elements to the list.
myList.AddHead(CString("ABC"));
myList.AddHead(CString("123"));// Dump the list elements to the debug window.
POSITION pos = myList.GetHeadPosition();
for (int i=0;i < myList.GetCount();i++)
{
TRACE("%s\r\n", (LPCSTR) myList.GetNext(pos));
}