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

  Рет қаралды 2,432

Professor Hank Stalica

Professor Hank Stalica

Күн бұрын

Пікірлер: 7
@POWERPOWERPOWER_
@POWERPOWERPOWER_ 3 ай бұрын
The Diagram that showed what how the structure array is held in memory made it really click for me, thank you.
@IgnitionWeb
@IgnitionWeb Жыл бұрын
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{};`
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
Thanks for all the comments! All good ideas and I agree with you. In case you're wondering why I haven't done that so far, this channel primarily exists to support the classes I teach and so the videos I'm doing are a reflection of the textbook and SLO requirements of our department. I did do a video on std::array though (kzbin.info/www/bejne/a4bNe6WFq9F8iM0) and I am planning on doing a video on overloaded operators for structures as part of an advanced or optional series kind of deal.
@qcnck2776
@qcnck2776 Жыл бұрын
What is the benefit of using auto& rather than just auto in the range based for loop?
@ProfessorHankStalica
@ProfessorHankStalica Жыл бұрын
Here you go: kzbin.info/www/bejne/qnmwaoBsg8-LhZY It's about efficiency, copying one memory address instead of two struct members.
@qcnck2776
@qcnck2776 Жыл бұрын
@@ProfessorHankStalica Thanks 👍
@IgnitionWeb
@IgnitionWeb Жыл бұрын
IMO you should prefer to encourage use of std::array over c-style arrays
Nested Structures -- C++ Structs Tutorial #5
5:35
Professor Hank Stalica
Рет қаралды 1,8 М.
Passing structures to functions -- C++ Structs Tutorial #6
12:46
Professor Hank Stalica
Рет қаралды 3,5 М.
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН
C++ Tutorial:  enumerated data types [enums]
16:38
Professor Hank Stalica
Рет қаралды 2,3 М.
C++ Vectors Tutorial: Master Dynamic Arrays and Advanced Data Storage
29:09
Professor Hank Stalica
Рет қаралды 2,9 М.
C++ Tutorial [33] - Arrays of Structures
12:47
Kody Simpson
Рет қаралды 28 М.
Pointers and structures -- C++ Structs Tutorial #8
12:49
Professor Hank Stalica
Рет қаралды 2,1 М.
Dynamic Memory Allocation -- C++ Pointers Tutorial [8]
18:25
Professor Hank Stalica
Рет қаралды 29 М.
Dynamic Arrays of Objects (Data Structures course, step-by-step)
46:29
Structs (Records) in C++: Defining Your Own Structured Data Type
11:24
Programming with Dr. Hayes
Рет қаралды 1,2 М.
C++ Tutorial for Beginners: Unions
11:11
Professor Hank Stalica
Рет қаралды 2,5 М.
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН