Skip to content

Instantly share code, notes, and snippets.

@asambol
asambol / effective_c++.md
Last active May 2, 2024 21:12
Effective C++ by Scott Meyers

Chapter 1. Accustoming Yourself to C++

Item 1: View C++ as a federation of languages

  • Rules for effective C++ programming vary, depending on the part of C++ you are using.

Item 2: Prefer consts, enums, and inlines to #defines

  • For simple constants, prefer const objects or enums to #defines.
  • For function-like macros, prefer inline functions to #defines.