C++ Switch Statement

preview_player
Показать описание
C++ Switch Statement. In this video, you will learn how to use a switch statement for comparing values instead of using an if/else condition statement. With a switch statement, at compile time, a jump table/look up table is created, which maps each case value. With the table, C++ will jump to the case that matches the value. This is much more performant than an if/else statement, where we need to check each individual if statement until we hit our condition. This is known as the if/else ladder.

In addition, you will learn how to group switch cases together and use the break statement to exit the switch case code blocks.

C++ Playlist:

Subscribe for more coding tutorials 😄!
Рекомендации по теме
Комментарии
Автор

Well explained and a brilliant series. Thanks.
(Suggestion - can you do an intermediate series that covers difficult topics followed by an advanced series on even more difficult topics?)

wolfwirestudios