请问高手个问题。我在做程序时,用到集合类CList,这时应该在头文件中加#include "afxtemp1.h",但编译时总是说找不到该文件。去掉#include"afxtemp1.h"时,又显示说CList没有定义,不知为何,望高手赐教。

解决方案 »

  1.   

    确认你在工程的.h中加入afxtemp1.h
    试试看
      

  2.   

    我都试过,但只要有#include "afxtemp1.h"就会有下面编译提示:fatal error C1083: Cannot open include file: 'afxtemp1.h': No such file or directory
    我把#include "afxtemp1.h"加到AppWizard生成的***Doc.h头文件最顶部了,即
    #include <afxtemp1.h>#if !defined(AFX_RECORDELLPDOC_H__63B401CB_9021_4C4F_B2D4_F5A3DAF76709__INCLUDED_)
    #define AFX_RECORDELLPDOC_H__63B401CB_9021_4C4F_B2D4_F5A3DAF76709__INCLUDED_#if _MSC_VER > 1000
    #pragma once
    #endif
    位置不会碍事吧。再有会不会是我用的盗版VC的事?
      

  3.   

    afxtempl.h,那里不是1(one),是l(L)还有就是最好是放在
    #if _MSC_VER > 1000
    #pragma once
    #endif
    之后
      

  4.   

    afxtempl.h
           ~这个字符是l(它的大写是L),我看你的标题,那里那个字符好像是1(中文中的一)
      

  5.   

    一星的朋友(earthdog)谢谢了。
    还有一事请教,SetROP2(HDC,int)参数是否必须用两个,HDC是代表什么?
      

  6.   

    用 #include "afxtempl.h"  用引号就ok了.
    setROP2用一个就可以了,