1.3. How to use this book?

Sharpen the knife before cutting the wood!

—Lun Yu

1.3.1. Build The Source Code

The source code of this book can be downloaded at SEIN Github Repo.

To run the code, you need to install google test. In Ubuntu, just run:

sudo apt install libgtest-dev

Then, please use git to clone the repo, and run this:

sudo cp ./source/ch1-intro/sein.hpp /usr/local/include/

Both CMake and Bazel build are supported. Build With CMake

mkdir build
cd build
cmake ..
make -j `nproc` Build With Bazel

1.3.2. Debug The Source Code

To debug the source code line by line, I recommend using CLion. CLion can automatically detect the test cases so that you can start to debug right away by clicking a button in the GUI.


Figure 1.3.1 Debug with CLion

1.3.3. How this book is structured? Algorithm

1.3.4. How do I wrote this book?

Chapter page template:

Chapter Title

.. toctree::
   :maxdepth: 2


Questions page template:


Question Title

.. code-block:: none

    Question contents ...



.. only:: html

    - http://www.wu-99.com

Test code template:

#include <gtest/gtest.h>
#include <sein.hpp>

namespace ns_abc{
using namespace ns_abc;
TEST(_abc, a) {

Take Section 3.8 as an example.