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

后端 未结 4 1127
无人及你
无人及你 2020-11-22 06:47

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 u

4条回答
  •  無奈伤痛
    2020-11-22 07:40

    It's a "precompiled header file" -- any headers you include in stdafx.h are pre-processed to save time during subsequent compilations. You can read more about it here on MSDN.

    If you're building a cross-platform application, check "Empty project" when creating your project and Visual Studio won't put any files at all in your project.

提交回复
热议问题