It’s only true when using Precompiled Headers (PCH), and the reason why there shouldn’t be anything before the #include "stdafx.h"
is :
Visual C++ will not compile anything before the #include “stdafx.h” in
the source file, unless the compile option /Yu’stdafx.h’ is unchecked
(by default); it assumes all code in the source up to and including
that line is already compiled
from http://en.wikipedia.org/wiki/Precompiled_header
Related Contents:
- Convert CString to const char*
- Running my C++ code gives me a blank console
- Order of evaluation of arguments using std::cout
- Setup OpenCV-2.3 for Visual Studio 2010
- Static variables initialisation order
- Debugging with command-line parameters in Visual Studio
- How to detect whether there is a specific member variable in class?
- Where does Visual Studio look for C++ header files?
- Displaying the #include hierarchy for a C++ file in Visual Studio
- error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
- #include all .cpp files into a single compilation unit?
- Export all symbols when creating a DLL
- How to set up Google C++ Testing Framework (gtest) with Visual Studio 2005
- GCC style weak linking in Visual Studio?
- Automatically stop Visual C++ 2008 build at first compile error?
- How do I input variables using cin without creating a new line?
- How do I build an import library (.lib) AND a DLL in Visual C++?
- Serial Comm using WriteFile/ReadFile
- How to display a dynamically allocated array in the Visual Studio debugger?
- How do I start a new CUDA project in Visual Studio 2008?
- Visual Studio 2012 __cplusplus and C++ 11
- How to include OpenSSL in Visual Studio
- Exporting classes containing `std::` objects (vector, map etc.) from a DLL
- Mixing debug and release library/binary – bad practice?
- How can I make Visual Studio’s build be very verbose?
- How to create NVIDIA OpenCL project
- How do I print to the debug output window in a Win32 app?
- M_PI works with math.h but not with cmath in Visual Studio
- C++ Visual Studio character encoding issues
- Linking dll in Visual Studio
- Visual Studio: Run C++ project Post-Build Event even if project is up-to-date
- GCC equivalent of MS’s /bigobj
- visual c++: #include files from other projects in the same solution
- When including header files, is the path case sensitive?
- Errors when linking to protobuf 3 on MS Visual C
- fatal error LNK1104: cannot open file ‘libboost_system-vc110-mt-gd-1_51.lib’
- Unresolved external symbol LNK2019
- In Visual Studio, `thread_local` variables’ destructor not called when used with std::async, is this a bug?
- trying to use VideoCapture and imshow(), raises Assertion failed (size.width>0 && size.height>0) in cv::imshow
- How to get a Windows symbol server set up
- How to set breakpoint at the very beginning of program execution
- How to fix .pch file missing on build?
- What is the difference between the /Ox and /O2 compiler options?
- Cannot open include file: ‘ctype.h’: No such file or directory
- in Visual Studio 2010 or 2008 [duplicate]
- Enable a single warning in Visual Studio
- Wrote to a file using std::wofstream. The file remained empty
- srand(time(NULL)) generating similar results [duplicate]
- What is the difference between “Include Directories” and “Additional Include Directories”
- Static library debug symbols