Book Image

Learning C++ by creating games with UE4

By : William Sherif
Book Image

Learning C++ by creating games with UE4

By: William Sherif

Overview of this book

Table of Contents (19 chapters)
Learning C++ by Creating Games with UE4
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Variables and Memory
Index

Summary


You learned about objects in C++; they are pieces of code that tie data members and member functions together into a bundle of code called class or struct. Object-oriented programming means that your code will be filled with things instead of just int, float, and char variables. You will have a variable that represents Barrel, another variable that represents Player, and so on, that is, a variable to represent every entity in your game. You will be able to reuse code by using inheritance; if you had to code implementations of Cat and Dog, you can code a common functionality in the base class Mammal. We also discussed encapsulation and how it is easier and more efficient to program objects such that they maintain their own internal state.