Skip to content

C guidelines

akure edited this page Apr 5, 2021 · 1 revision
  1. Inheritance is not for code re-use. In c++ it is wrong to use inheritance for code re-use. It is the composition, which is used for composition. Inheritance in C++ is for designing interfaces and used for only dynamic binding. If you don't have any use case where you don't have dynamic binding requirement, then you should not use inheritance.

  2. Throw from already thrown exception.

Clone this wiki locally