stdafx.h的头文件无法编译

最近在练习某本上代码的时候,发现stdafx.h这个头文件无法正常预编译,网上的方法都试过没有用,于是copy的书上的方法。书上在头文件下增加了StdAfx.cpp和StdAfx.h的文件,文件的代码如下
第一个.cpp文件
#include “stdafx.h”
第二个.h文件
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#if !defined(AFX_STDAFX_H__B4527523_A237_430D_80C3_EFCE53FD7045__INCLUDED_)
#define AFX_STDAFX_H__B4527523_A237_430D_80C3_EFCE53FD7045__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers

#include

// TODO: reference additional headers your program requires here

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__B4527523_A237_430D_80C3_EFCE53FD7045__INCLUDED_)
其他方法试过没有用的小伙伴可以试试这个方法,注释没有擦,希望这些东西能给你点启发。第一次写这个东西,看着网上没有这个方法就写了这篇垃圾博客,如果有人能有能力写出更好的请联系我删了这个,毕竟要留精品给广大的学习者stdafx.h的头文件无法编译_第1张图片
stdafx.h的头文件无法编译_第2张图片
stdafx.h的头文件无法编译_第3张图片

成功运行…起码stdafx.h能运行对吧
在这里插入图片描述

你可能感兴趣的:(c++/c,c++,c语言)