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

Chapter 4. Looping

In the previous chapter, we discussed the if statement. The if statement enables you to put a condition on the execution of a block of code.

In this chapter, we will explore loops, which are code structures that enable you to repeat a block of code under certain conditions. We stop repeating that block of code once the condition becomes false.

In this chapter, we will explore the following topics:

  • While loops

  • Do/while loops

  • For loops

  • A simple example of a practical loop within Unreal Engine