Best practice to avoid Circular Dependencies in C++?

Hello darknsf,

in C++, we use #pragma once in header files, to ensure headers are include only once. ( I personnally use the #ifdef preprocessor more often, but it’s not supported in UE4 as far as I’m concern)

Also, for exemple: if a class A has a reference to a class B and in this class B with also need class A, we use forward declaration (partial inclusion for incomplete type but, perfect to use in header file)

Pragma once link 1

Pragma once link 2

Forward declaration link 1

If you need more explanations or details, just tell me I’m glad to help.

gamer08