Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:cpp

Dies ist eine alte Version des Dokuments!


C++

Rules of Thumb

  1. Pass and return primitives as value to and from functions
  2. Pass objects as const reference to functions and omit const only when the function is designed to modify the object
  3. Return objects which are attributes of the class as const reference and objects wich are not class attributes (especially stack objects) as value!
  4. Prefer references to pointers
  5. Encapsulate new and delete in the constructor and destructor of a class
  6. Always declare constant primitives and objects with const
Cookies helfen bei der Bereitstellung von Inhalten. Diese Website verwendet Cookies. Mit der Nutzung der Website erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Computer gespeichert werden. Außerdem bestätigen Sie, dass Sie unsere Datenschutzerklärung gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website. Weitere Information
becki/linux/cpp.1242376948.txt.gz · Zuletzt geändert: 2009-05-15 08:42 von becki

Impressum - Datenschutzerklärung