> for (size_t i = 0; i < raw_level.size(); i++)
They say this is C++ code but, this is all C code. For instance, why aren't they using a range-based for loop?
for (auto& level : raw_level)
Boom! No more bugs.
> I certainly don’t feel as safe writing this code as I would in rust
Ah... there it is
When asking why some people like Rust over C++, I think not enough weight is given here: Rust got to not worry about decades of legacy C stuff seeping in. If Rust isn't your jam -- and I get why it wouldn't be -- there are some initiatives starting now from within the C++ community to shed the C legacy with a new language that feels a lot more like modern C++. Herb Sutter's cppfront[0] and Carbon[1] are examples.
But I don't think it makes sense to dismiss this criticism just because the author happens to like Rust. These C idioms continue to be valid and reasonably widely used in C++.
[0]: https://github.com/hsutter/cppfront [1]: https://github.com/carbon-language/carbon-lang