YoVDO

Why C++ Code Failed - Common Mistakes and Best Practices

Offered By: The Cherno via YouTube

Tags

C++ Courses Memory Management Courses API Design Courses

Course Description

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore common C++ coding pitfalls and best practices in this 38-minute video tutorial. Learn about efficient memory allocation, API design, code organization, variable initialization, class hierarchies, state management, preprocessor directives, and more. Discover tips for writing cleaner, more efficient C++ code, including proper use of structs vs. classes, handling compilation warnings, and leveraging std::weak_ptr. Gain insights to improve your C++ programming skills and avoid common mistakes that can lead to code failures.

Syllabus

- Hello
- ALWAYS stack allocate if you can
- The cat is back
- API design considerations
- return 0 in the main function
- Organization and code conventions
- Variable intialization
- Deep class hierarchies
- Managing states
- defines
- Avoid copying causing unnessary heap allocations
- More on #define
- Consistent code style
- Compilation warnings
- Logging and release builds
- struct vs class
- Cleaner code
- Final thoughts and conclusion
- Use std::weak_ptr


Taught by

The Cherno

Related Courses

Computer Graphics
University of California, San Diego via edX
Intro to Parallel Programming
Nvidia via Udacity
Initiation à la programmation (en C++)
École Polytechnique Fédérale de Lausanne via Coursera
C++ For C Programmers, Part A
University of California, Santa Cruz via Coursera
Introduction à la programmation orientée objet (en C++)
École Polytechnique Fédérale de Lausanne via Coursera