Perform the following steps to complete this recipe:
- From a new Terminal, run the following code to download the source code:
> cd ~/
> git clone https://github.com/PacktPublishing/Advanced-CPP-CookBook.git
> cd Advanced-CPP-CookBook/chapter01
- To compile the source code, run the following code:
> mkdir build && cd build
> cmake ..
> make recipe01_examples
- Once the source code has been compiled, you can execute each example in this recipe by running the following commands:
> ./recipe01_example01
The answer is: 42
> ./recipe01_example02
The answer is: 42
> ./recipe01_example03
The answer is: 42
> ./recipe01_example04
The answer is: 42
The answer is: 42
> ./recipe01_example05
The answer is: 42
The answer is: 42
> ./recipe01_example06
The answer is: 42
The answer is: 42
> ./recipe01_example07
The answer is: 42
> ./recipe01_example08
The answer is: 42
> ./recipe01_example09
The answer is: 42
In the next section, we will step through each of these examples and explain what each example program does and how it relates to the lessons being taught in this recipe.