0%
November 27, 2022

Precompiled Header

C++

Step 1

We first prepare a header file that contains all the header that we want:

// pch.h
#pragma once

#include <iostream>
#include <array>
#include <vector>
#include <functional>

Step 2

At the same directory we create a pch.cpp that includes that header file

// pch.cpp
#include "pch.h"

Step 3

Change the properties of pch.cpp as follows:

Step 4

Change the properties of the whole project as follows: