声明一个'CString'的类型,为什么总是提示error C2065: 'CString' : undeclared identifier

解决方案 »

  1.   

    error C2065: 'CString' : undeclared identifier~~~
    加个头文件#include <afx.h>
    试试看看~~~
      

  2.   

    基本的MFC类都在afxwin.h
    要使用一些API函数,可调用afx.h
      

  3.   

    有这个的#include "stdafx.h",在加#include <afx.h>,提示fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>
      

  4.   

    #include <afxext.h>//CString 包含在这个头文件.
      

  5.   

    参看:
    http://www.vckbase.com/document/viewdoc/?id=1437