The compiler does not compile code from lesson

The compiler does not compile code from lesson https://docs.unrealengine.com/latest/INT/Programming/Tutorials/Components/5/index.html

Error the line of code “CollidingPawn.cpp”:
OurMovementComponent->UpdatedComponent = RootComponent;

Error text: “IntelliSense: pointer to incomplete class type is not allowed”

“CollidingPawn.h” text:

class UCollidingPawnMovementComponent* OurMovementComponent;    

You could try moving the following line from CollidingPawn.cpp

#include "CollidingPawnMovementComponent.h"

into CollidingPawn.h

So at the top of the classes you want to have it look like this:

CollidingPawn.h:

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#pragma once

#include "CollidingPawnMovementComponent.h"
#include "GameFramework/Pawn.h"
#include "CollidingPawn.generated.h"

...

CollidingPawn.cpp:

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "HowTo_Components.h"
#include "CollidingPawn.h"

...

Hello,

Please make sure that you’ve initialized the movement component correctly:

OurMovementComponent = CreateDefaultSubobject<UCollidingPawnMovementComponent>(TEXT("CustomMovementComponent"));

Also, appropriate header should be included:

#include "CollidingPawnMovementComponent.h"

Finally, please note that IntelliSense can provide false-positive errors (however, the code should compile, so this isn’t the case in this situation, but you may deal with this issue later), so disabling it is a good solution.
If you like to learn more about setting up Visual Studio for UE4, please go here:

Hope this helped!

Good luck!

Paste in project “Content Starter Pack” and inserting lines #include "CollidingPawnMovementComponent.h"

= success)

Thank you!!!

No points for Jakucha :confused: