Translations:Development/Tutorials/Common Programming Mistakes/38/en: Difference between revisions
(Importing a new version from external source) |
(No difference)
|
Latest revision as of 07:31, 26 October 2019
You will reduce compile times by forward declaring classes when possible instead of including their respective headers. The rules for when a type can be used without being defined are a bit subtle, but intuitively, if the only important aspect is the name of the class, not the details of its implementation, a forward declaration is permissible. Two examples are when declaring pointers to the class or using the class as a function argument.