Confused about a couple things

First off I apologize for the poor image quality it was the only way to get the cursor message included in the image.

My First question is why am I getting this message (pointer to incomplete class type is not allowed) ?
Everything compiles fine and works normally I’m just curious.

My second is just a request for some clarification. I’m a bit confused about what is happening with the circled areas in the following two images. I think I need to review pointers but if someone could break down these two areas it would be greatly appreciated.
Question%202 Question%203

  1. This is Visual Studio’s way of saying it has no idea what that returns, so it can’t help with the autocomplete. It’ll still work, but it’ll give you that message. This is talked about in video 69. The solution is to include whatever file that is. If you google “unreal {classname}”, you’ll find the docs, which will have the file listed at the bottom of the page. In this case, it’d take you here:
    And, if you check the bottom, you can see the file. So if you add #include "Components/ActorComponent.h" to the top of the TankAimingComponent.cpp file, the message will go away.

  2. The first is defining a variable within the ATank class named TankAimingComponent, which is a pointer to the UTankAimingComponent. The second is using that pointer to call one of it’s methods.

Thank you! This was super helpful.

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

Privacy & Terms