How do i know what to include UE 4.16
Since i updated to the new engine i need to include engine.h... What can i do instead of using that because it's annoying that i have to add that #include "engine.h" in every cpp file i have. What are the other alternatives? without engine.h i cant use the IntelliSense the way i have learned and when i try to GetOwner()->GetName() it doesnt work because i dont have that header file included on my cpp.
asked Jun 05 '17 at 07:44 AM in C++ Programming
You should just include Engine.h as it is the easiest way to do it. You have to include at least one other header file anyways, so just include Engine.h and be happier. If you want to know exactly what you would have to include to get any function just search through the source code of the engine.
answered Jun 05 '17 at 09:27 AM
when you are inheriting class Child from class Base, you only need to include "Engine.h" in Base.h, because then it gets included automatically in all the files that include "Base.h" and so on.
in other words simply put, included headers are inherited.
in other words put realistically - in C++ compiler must know all what Engine.h defines before these are being used in other files, therefore you must inform the compiler to check these definitions before, because otherwise the compilation order is not guaranteed to be in ascending order. it's like a case in which somebody would ask you to feed Bob, and that he will tlel you who is actually Bob after you feed him. it's illogical.
conclusion: it's C++. you can only do C++ C++ way.
Follow this question
Once you sign in you will be able to subscribe for any updates here