Home > Articles

  • Print
  • + Share This
This chapter is from the book

Getting This Book’s Source Code

Most professional developers utilize source control systems, which, among many other features, keep a history of the source code. With such a system, if code changes cause unexpected or undesired behavior, it’s easy to return to a previously known working version of code. Furthermore, source control allows for much easier collaboration between multiple developers.

One popular source control system is Git, originally developed by Linus Torvalds of Linux fame. In Git, the term repository refers to a specific project hosted under source control. The GitHub website (https://github.com) provides for easy creation and management of Git repositories.

The source code for this book is available on GitHub at https://github.com/gameprogcpp/code. If you are unfamiliar with the Git system, you can simply click the green Clone or Download button and choose Download ZIP to download a compressed ZIP file that contains all the book’s source code.

Alternatively, if you wish to use Git, you can clone the repository via the command line, as follows:

$ git clone https://github.com/gameprogcpp/code.git

This command works out of the box in the macOS terminal, but Windows users need to first install Git for Windows (see https://git-for-windows.github.io).

The source code contains a separate directory (or folder) for each chapter. For example, this chapter’s source code is in the Chapter01 directory. In this directory, there is a Chapter01-Windows.sln file for Microsoft Visual Studio and a Chapter01-Mac.xcodeproj file for Apple Xcode. Before moving forward, make sure that you can compile the code for this chapter.

  • + Share This
  • 🔖 Save To Your Account