The video begins this segment with a harsh truth: If you are using a for loop with an integer index (int i = 0; i < v.size(); i++) to iterate over a vector, you are writing "C with Classes," not C++.
The Old Way (The "Amateur" Way):
std::vector<int> v = 1, 2, 3, 4, 5;
for (int i = 0; i < v.size(); ++i)
std::cout << v[i] << " ";
Why this is wrong (according to the video): bibigon vid 5 part 2 last 12min updated
Some content becomes genuinely lost. If “Bibigon vid 5 part 2” was deleted by its creator or platform, the “updated” version may have a very small circulation. In that case, consider: The video begins this segment with a harsh
The final segment of the video marks a pivotal moment where the instructor stops teaching "how to make it work" and starts teaching "how to do it correctly according to the STL standard." This is where the viewer is broken of the habit of treating C++ vectors like C-style arrays. Why this is wrong (according to the video):