So I have been trying to learn cpp and I was writing a program, and when I try to build the solution, it gives an error saying
unexpected end of file while looking for precompiled header. Did you forget to add #include "pch.h" to your source?
Then I included it and I got the same error, and also another saying
cannot open source file pch.h
To turn off precompiled headersSelect the Configuration properties > C/C++ > Precompiled Headers property page. In the property list, select the drop-down for the Precompiled Header property, and then choose Not Using Precompiled Headers.
pch stands for precompiled header. In computer programming, a precompiled header is a (C or C++) header file that is compiled into an intermediate form that is faster to process for the compiler.
The file stdafx. h is usually used as a precompiled header file. Precompiled headers help to speed up compilation when a group of files in a project do not change.
One option, if you are new to c++, is to just turn off pre-compiled headers in the project settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With