网上下的代码老是在这里报错
又找不到这个头文件~
谢谢~

解决方案 »

  1.   

    预编译用的。
    网上下的代码,假如不包含工程文件,在建立工程时要选
    setting->c/c++->precompiled headers->not using
      

  2.   

    隨便看一個由 AppWizard 產生的 project,其 stdafx.h 內是一些
    必要的 include files(例如 afxwin.h)。對應於 stdafx.h 則有
    一個 stdafx.cpp,其內只是 #include "stdafx.h"。這有什麼用意?用意是,讓 stdafx.cpp 編譯出一個 stdafx.obj,成為
    所謂的 "pre-compile-header"(需搭配特殊 compile option。
    AppWizard 會為我們的 project 自動設定這個特殊的 option),
    可大幅降低第二次(以降)的編譯所需時間(因為標準 MFC headers
    不需再編譯一次)。往後,你每使用 ClassWizard 協助開發此程式,ClassWizard 便有
    可能在 stdafx.h 中增加新的 include files。例如,你若選用
    MFC template classes,stdafx.h 中便會增加 #include <afxtempl.h>。如果你不要 afxstd.h,意味你得自己 take care 這些事情。