Arrays of Structures -- C++ Structs Tutorial #4

preview_player
Показать описание
Learn how to define, access, and initialize arrays made up of structures.

In this C++ programming tutorial for beginners, you'll learn through coding examples using Visual Studio C++ Community.

1:04 ⇒ Coding Begins

// Learn More

// Consider supporting this channel in multiple ways
Bitcoin: 177wfkQwzXiC8o2whQMVpSyuWUs95krKYB
Dogecoin: DRK2HDp3ZkkbFpvGZnVgMVosnBhPv8r3uP
Рекомендации по теме
Комментарии
Автор

The Diagram that showed what how the structure array is held in memory made it really click for me, thank you.

POWERPOWERPOWER_
Автор

Also if you want to encourage values being initialized, you should do the same within the struct. either `float f = 0.f;` or just `float f{};`

IgnitionWeb
Автор

IMO you should prefer to encourage use of std::array over c-style arrays

IgnitionWeb
Автор

What is the benefit of using auto& rather than just auto in the range based for loop?

qcnck