MFC问题集之头文件被包含一次

2014-11-17 17:38:33 · 作者: · 浏览: 41

  vc++头文件被包含一次


  比如你的头文件叫stdafx.h


  方法一:


  #ifndef _stdafx_h


  #define _stdafx_h


  //the header content


  #endif


  方法二:


  头文件第一行写下:


  #pragma once