Why do we not have to include world and InputComponent?

In the previous project we needed to #include “Engine/World.h” and also declare our InputComponent.
This time we don’t do it. It compiles but my VSCode hates it.
Why are we not doing it this time? And why does the lecturer not get red squiggles in VSCode?
Did I just miss the part where he included it?

It’s probably included somewhere else in the build chain. I wouldn’t rely on it at all though and always include what you use.

  1. In a header, include as little as possible and use forward declarations when you can.
  2. In a source file include everything that you are using.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms