A companion for learning the C++ programming language
De som köpt den här boken har ofta också köpt The Anxious Generation av Jonathan Haidt (inbunden).
Köp båda 2 för 788 krIn this book, the author shares his perceptions about physics and the universe, which he developed when working on software that processes a few elementary physics simulations, as well as while testing it on different computers.
Marcos Tewfiq holds bachelor's degrees in Electronics Engineering (ITA, Brazil), in Law, and in Economics (both from PUCRS, Brazil). His passion for technology leads him to be always studying, for example, through online courses. It is worth mentioning some achievements related to the subject of this book: Fundamentals of Computing Specialization, by Rice University, through Coursera; C++ Nanodegree Program, by Udacity; Professional Certificate in C Programming with Linux, by Dartmouth College and Institut Mines-Tlcom, through edX; 2.086x: Computational Thinking for Modeling and Simulation, by MITx, through edX. In this book, he synthesizes his knowledge and experience concerning the C++ programming language.
introduction 1
Underlying Physics 1
Output Screenshot 2
Key concepts 3
The building processes 7
Special hints 8
Variables 9
Functions 10
Data structures 11
Classes 12
Control flow 17
Practice-1 18
Practice-2 19
Practice-3 20
Variables-2 23
Functions-2 26
Classes-2 30
Concurrency 32
Concurrency-2 36
Practice-4 40
The SDL Library 44
Installation 44
Rendering an image 45
Rendering a text 46
Legal Notice 47
The Multiple Balls Collision Simulator 48
Program structure 48
The big picture 49
The Main.cpp 50
The “processPiston” function 53
The “Ball” class 55
Conquering the software 58
Iterative Learning 60
Energy Escape 60
Energy Excess 60
Inelastic Collisions 62
Newton’s Law of Gravitation 65
Software limits? 66
Installation 67
Linux and Mac 67
Windows 69
Common usage 71
Gravitational Simulations 73
Planet and Satellite 73
Launching a Satellite 74
Creating a Fictional Universe 77
Concepts addressed 79
Loops, Functions, I/O 79
Objected Oriented Programming 79
Memory Management 80
Concurrency 80
Real-time simulation 80
Appendix-A 81
Constants.h 81
Globals.h 82
CylinderObject.h 83
Ball.h 85
Wall.h 87
CylinderObject.cpp 88
Ball.cpp 90
Wall.cpp 101
Main.cpp 102
Parameters.txt 118
CMakeLists.txt 119
sdl2-config.cmake 120
Appendix-B 121
Globals.h 121
CylinderObject.h 123
Ball.h 125
Wall.h 128
CylinderObject.cpp 129
Ball.cpp 131
Wall.cpp 146
Piston.cpp 147
Main.cpp 151
Parameters.txt 169
CMakeLists.txt 170