Why is my c++ program always asking to type
#include "stdafx.h" in the precompiled header??
Why is my c++ program always asking to type
#include "stdafx.h" in the precompiled header??
If you turn off precompiled headers in the IDE (compiler->settings), then it should stop.
I must admit that I'm not very familiar with term "Precompiled headers".
Can you explain it with a little more detail Salem?
Gotta love the "please fix this for me, but I'm not going to tell you which functions we're allowed to use" posts.
It's like teaching people to walk by first breaking their legs - muppet teachers! - Salem
If you are using Microsift Visual C++ latest versions, they need a pre-compileed header that contains functions and prototypes that work alongside the IDE you are using. If you create a program that uses muti-files, such as a large project, any files apart from header files you create, thus scource code files c.pp need the precompiled header in order for the compiler to understand certain aspects of the code. I do not know much more, but you could press F1 and go into the in depth help files and look that way.
A pre-compiled header is used to speed up compile times by combining commonly used headers into a single header (stdafx.h) that is "pre-compiled" once instead of having the common headers processed every tie they are included in another source file.
You don't need pre-compiled headers for small projects. If you do use them, you just have to add #include "stdafx.h" as the first include in all your source files. If you don't want to use them, then when you create your project in VC++, pick Win32 Console Application, and in the wizard make sure to check Empty Project. You might have to switch to a different page to find that option. If the project is already created, you'll have to find the option in the project settings or project properties.