4 ms·
This feels like it was written by someone who started learning C++ the day before he wrote this tutorial
by TylerGlaiel 4y ago
This feels like it was written by someone who started learning C++ the day before he wrote this tutorial
- jakearmitage 4y agoThe sad thing is that there are tons of people doing this in a professional environment. auto and shared_ptr all the things. exceptions everywhere. RTTI. <cstdio> <cmath>.
- melony 4y agoThe code looks fine to me. If you see the newer C++23 guides like Lospinoso's C++ book, auto, shared_ptr, braces default value initializations are all considered best practices now. The only major issue I see is that OP should have used references instead of shared_ptrs for some of the variables.
- TylerGlaiel 4y agoNot a single one of the things he has as a shared pointer needed to be a pointer at all.