针对该定义产生的错误信息:  
  error   C2143:   syntax   error   :   missing   ";"   before   "<"  
  error   C2501:   "CList"   :   missing   storage-class   or   type   specifiers  
  error   C2059:   syntax   error   :   "<"  
  error   C2238:   unexpected   token(s)   preceding   ";"  
  Error   executing   cl.exe.  


需要加 #include   <afxtempl.h>




myList.AddHead(CString("ABC"));
 myList.AddHead(CString("def"));
 myList.AddHead(CString("ghi"));
 POSITION pos;
 pos=myList.GetHeadPosition();
 for(int i=0;i<myList.GetCount();i++)
 {
 // TRACE("%s\n",myList.GetNext(pos));
  pos=myList.FindIndex(i);
  TRACE("%s\n",myList.GetAt(pos));
 
 }

相关文章:

  • 2021-12-19
  • 2022-12-23
  • 2021-07-23
  • 2021-11-15
  • 2021-12-02
  • 2022-12-23
  • 2021-12-17
猜你喜欢
  • 2021-12-08
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2021-09-29
相关资源
相似解决方案