You create a new precompiled header (.PCH) file by compiling with the /Yc (“create”) option. This option lets you specify the name of the .PCH file and choose the place at which to save the compilation state. You can also control these factors using the the /Fp (“precompiled header filename”) option and the optional hdrstop pragma.
You use a precompiled header by compiling with the /Yu (“use”) option, which tells the compiler to restore the compilation state from a given precompiled header. Like the /Yc option, this option offers alternate ways to specify filenames, and it can make use of the hdrstop pragma.
The following sections describe the precompiled header options and the hdrstop pragma in more detail.