How to do it...

To perform this recipe, perform the following steps:

  1. From a new Terminal, run the following command to download the source code:
> cd ~/
> git clone https://github.com/PacktPublishing/Advanced-CPP-CookBook.git
> cd Advanced-CPP-CookBook/chapter13
  1. To compile the source code, run the following command:
> cmake .
> make recipe04_examples
  1. Once the source code is compiled, you can execute each example in this recipe by running the following commands:
> ./recipe04_example01 
1

> ./recipe04_example02
42

> ./recipe04_example03
42

> ./recipe04_example04
4 8 15 16 23 42

> ./recipe04_example05
4 8 15 16 23 42

> ./recipe04_example06
4 8 15 16 23 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset