明明include进去了,却说没有找到我的这个类
比如:CPrintDlg *m_pPrintDlg;
报错: error C2501: 'CPrintDlg' : missing storage-class or type specifiers
又好像::OpenPrinter,我已经#include <winspool.h>了,
却说
 error C2039: 'OpenPrinter' : is not a member of '`global namespace''求大虾相助!我已经被卡住了

解决方案 »

  1.   

    另外,这个SdtAfx.h好像很奇怪,产生的效果也是很奇怪的
      

  2.   

    怎么 include 进去的啊? 写出来看看啊。openprinter 还需要link Winspool.lib 的。
      

  3.   

    把顺序调一下,保证你的include 在#include "StdAfx.h"的后边。
      

  4.   

    谢谢各位,现在好了。
    link Winspool.lib 
    还有  顺序调一下,保证你的include 在#include "StdAfx.h"的后边。我的各个头文件是互相include的,现在我取消某些include就没有这个问题了,
    当然也放弃了一些成员变量