I installed Visual Studio, downloaded everything I needed, started working and saw that “stdafx” was missing.
Where can I find it in the public domain for download and where can I download it later?
Answer 1, authority 100%
stdafx.h is the default name precompiled header file in Visual Studio 2017 and earlier. As of VS2019, pch.h is used instead. It does not need to be downloaded from anywhere, header files are often included in the code to speed up compilation. The file itself should be created automatically when the project is created; but if it is not there, you can add it manually. The content should look something like this:
#pragma once #include <stdio.h> //other directivesinclude...
Together with it, the project should contain pch.cpp , consisting of a single line:
To use precompiled headers, they must be enabled with the / Y parameter or via the project’s Configuration Properties & gt; C / C++ & gt; Precompiled Headers . After that, in each cpp-file at the very beginning (before any preprocessor directives or lines of code) you need to add