This book is a companion for learning the C++ programming language. It presents some major concepts, applied to an example, a multi-ball collision simulator, which will run in real-time in a multi-thread structure. The program is explained, with the goal of making possible for the reader its improvement or even application to other fields. This is not a complete or basic course. The objective is to be a complementary tool, a practical reference. There are examples extending the program, like the simplified simulations of a planet and its satellite, and the creation of a fictional universe. The elementary simulation of a satellite launching is also possible and is given as a challenge for the reader, who needs to find the right parameters. Therefore, this book is also useful for teaching and studying physics (Newtonian mechanics). In this second edition of the book, the program has minor changes to include a simulation of computer virus propagation based on a simple model.