stdafx.h

StdAfx + Header file - Order of inclusion in MFC application

≯℡__Kan透↙ 提交于 2019-11-26 11:39:43
问题 I am using Visual Studio 2005. I created an MFC based console application named \"StdAfx dependancy\". The IDE created the following files for me. Resource.h StdAfx Dependancy.h stdafx.h StdAfx Dependancy.cpp stdafx.cpp I added another class CHelper with Helper.h and Helper.cpp as below. Helper.h: #pragma once class CHelper { public: CHelper(void); ~CHelper(void); }; Helper.cpp #include \"StdAfx.h\" #include \"Helper.h\" CHelper::CHelper(void) { } CHelper::~CHelper(void) { } I created an

Purpose of stdafx.h [duplicate]

本小妞迷上赌 提交于 2019-11-26 00:38:26
问题 This question already has an answer here: What is “stdafx.h” used for in Visual Studio? 4 answers What is the purpose of the file stdafx.h and what is meant by precompiled headers ? 回答1: stdafx.h is a file, generated by Microsoft Visual Studio IDE wizards, that describes both standard system and project specific include files that are used frequently but hardly ever change . Compatible compilers (for example, Visual C++ 6.0 and newer) will pre-compile this file to reduce overall compile times

What is “stdafx.h” used for in Visual Studio?

╄→гoц情女王★ 提交于 2019-11-25 22:46:48
问题 A file named stdafx.h is automatically generated when I start a project in Visual Studio 2010. I need to make a cross-platform C++ library, so I don\'t/can\'t use this header file. What is stdafx.h used for? Is it OK that I just remove this header file? 回答1: All C++ compilers have one serious performance problem to deal with. Compiling C++ code is a long, slow process. Compiling headers included on top of C++ files is a very long, slow process. Compiling the huge header structures that form