Precompiled headers are useful during the development cycle to reduce compilation time, especially if:
You are changing the body of your source files more frequently than the header files, or the header files comprise a significant portion of the code for that module.
Your program is comprised of multiple modules, all of which use a standard set of include files. In this case, all include files can be precompiled into one precompiled header (if all these modules use the same compilation options).
The first compilation—the one that creates the precompiled header file—takes a bit longer than a normal compilation. Subsequent compilations can proceed more quickly by including the precompilation of the header files.
Summary: Precompiled headers work for C and C++ programs.
Precompiled headers work for both C and C++ programs. In C++ programming, it is common practice to separate class interface information into header files. These header files can later be included in programs that use the class. By precompiling these headers, you can reduce the time a program takes to compile.
NOTE:
You can have only one precompilation per source file. The compiler saves or restores its state at a specified point, then continues as it normally would. You use precompiled versions of multiple header files with the same source file.