- If we #include in a .h file we create a “chain”
- Any .h file that includes us will in-turn include
- This can be hard to keep track of
- To simply use a type, we can “forward declare”
- Simply put class ClassName; under the includes
- You’ll still need to #include in the .cpp to use.
(Unique Video Reference: 36_BT_URC)
We would love to know…
- What you found good about this lecture?
- What we could do better?
Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…
- Be in the correct forum (for the course).
- Be in the right sub-forum (for the section)
- Have the correct lecture tag.
Enjoy your stay in our thriving community!