Why are classes listed at the top.

Hello! This is probably a basic question, with loads of answers online, but I don’t know how to search for it. I assume this is a c++ feature, and not Unreal-specific, but I want to know why some files have classes listed at the top. Can someone point me towards documentation as to what this is doing, and what the purpose is? Is this similar to a friend class?

Thanks!

@ChrisMcCole It’s called forward declaration. You can use define a class ahead of time and then include it’s header in the cpp file to avoid cyclic inclusion (when a files would recursively include themselves).

2 Likes

Thank you very much! Exactly the info I was looking for :slight_smile: