31 nooby C++ habits you need to ditch
How many nooby C++ habits do you have? Up your C++ skill by recognizing and ditching these nooby C++ habits. Post how many you fell for! ― mCoding with James Murphy (https://mcoding.io) Source code: https://github.com/mCodingLLC/VideosS... C++ Core Guidelines: https://isocpp.github.io/CppCoreGuide... SUPPORT ME ⭐ --------------------------------------------------- Patreon: / mcoding Paypal: https://www.paypal.com/donate/?hosted... Other donations: https://mcoding.io/donate Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, John Martin, Casey G, Pieter G, Krisztian M, Mutual Information, Sigmanificient BE ACTIVE IN MY COMMUNITY 😄 --------------------------------------------------- Discord: / discord Github: https://github.com/mCodingLLC/ Reddit: / mcoding Facebook: / james.mcoding CHAPTERS --------------------------------------------------- 0:00 Intro 0:13 #1. using namespace std 0:42 #2. using std endl in a loop 0:55 #3. index based for when range-for fits better 1:10 #4. rewriting std algorithms 1:34 #5. using C array over std array 1:50 #6. any use of reinterpret cast 2:39 #7. casting away const 3:24 #8. not knowing map bracket inserts element 3:39 #9. ignoring const-correctness 3:59 #10. not knowing string literal lifetime 4:12 #11. not using structured bindings 4:47 #12. out-params instead of returning a struct 5:04 #13. not using constexpr 5:21 #14. forgetting to mark destructor virtual 6:10 #15. thinking class members init in order of init list 6:37 #16. not knowing about default vs value initialization 7:28 #17. MAGIC NUMBERS 7:41 #18. modifying a container while looping over it 8:30 #19. returning std move of a local 9:10 #20. thinking std move moves something 9:42 #21. thinking evaluation order is left to right 10:56 #22. unnecessary heap allocations 11:23 #23. not using unique ptr and shared ptr 12:11 #24. not using make unique and make shared 12:23 #25. any use of new and delete 12:52 #26. any manual resource management 13:24 #27. thinking raw pointers are bad 14:25 #28. using shared ptr when unique ptr would do 14:48 #29. thinking shared ptr is thread-safe 15:26 #30. mixing up const ptr vs ptr to const 16:00 #31. ignoring compiler warnings

The ONLY C keyword with no C++ equivalent

Prime Reacts: From C to C++ to Rust to Haskell

25 nooby Python habits you need to ditch

C Strings are Terrible!

Return Value Optimization and Copy Elision in C++

The worst programming language of all time

Forbidden C++

Should you learn C++?? | Prime Reacts

C++ Super Optimization: 1000X Faster

Stop using std::vector wrong
![C++ mistakes that can Hurt your Code (Avoid These!) [c++ beginner tips]](https://i.ytimg.com/vi/8LFtDRSw5E8/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLBpvwEegWJH4ckFt_5l1J2EVL1MDg)
C++ mistakes that can Hurt your Code (Avoid These!) [c++ beginner tips]

The best programming language of all time

Why C and C++ Still Matter — And Why Most People Struggle to Learn Them

E01: Stupid C++ Tricks with Dave

Stack vs Heap Memory in C++

Why i think C++ is better than rust

Why are C++ Programmers Angry in 2025?

Why do Senior C++ Engineers use size_t over int?

C++ cache locality and branch predictability

