# Help with Interfaces

**URL:** <https://forums.unrealengine.com/t/help-with-interfaces/132433>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [October 21, 2019, 10:15am UTC](https://forums.unrealengine.com/t/help-with-interfaces/132433 "2019-10-21T10:15:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GoldX18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GoldX18](https://forums.unrealengine.com/u/GoldX18)\
**Post date:** [October 21, 2019, 10:15am UTC](https://forums.unrealengine.com/t/help-with-interfaces/132433/1 "2019-10-21T10:15:18Z")

</div>

Hi All I’m needing some extra in-depth explanation as to how to use Unreal’s Interfaces.

Currently I’ve used the following example: [Interfaces in Unreal Engine | Unreal Engine 5.3 Documentation](https://docs.unrealengine.com/en-US/Programming/UnrealArchitecture/Reference/Interfaces/index.html)

I’ve made the ReactToTriggerInterface and ATrap classes/headers, and pasted in the appropriate code, however it won’t compile and generates errors:

```auto

\Source\SpaceProject/ATrap.h(25) : error C3668: 'AATrap::ReactToTrigger': method with override specifier 'override' did not override any base class methods
\Source\SpaceProject\ATrap.h(25) : error C3668: 'AATrap::ReactToTrigger': method with override specifier 'override' did not override any base class methods

```

I’ve spent a few hours on this, and managed to get a working interface following a different guide ([A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums](https://wiki.unrealengine.com/Interfaces_in_C%2B%2B)), but its quite different and doesn’t provide any base functionality from within the interface class which is what I’m after…

**I’ll share what code I’m struggling with below;**

> [@](#):
>
> ReactToTriggerInterface.h - [ReactToTriggerInterface.h - Pastebin.com](https://pastebin.com/wuH5psg1)  
> ReactToTriggerInterface.cpp - [ReactToTriggerInterface.cpp - Pastebin.com](https://pastebin.com/YbNYvGXG)
> 
> ATrap.h - [ATrap.h - Pastebin.com](https://pastebin.com/APjHn99J)  
> ATrap.cpp - [[ATrap.cpp - Pastebin.com](https://pastebin.com/BEkP23Zj)

]([ATrap.cpp - Pastebin.com](https://pastebin.com/BEkP23Zj))

As a workaround to using Interfaces, I could use a normal data driven class (UObject) with default methods I can implement and override…but then again whats the point of the interface if I do that right.

Any guidance is appreciated!

---

<div class="post-metadata">

**Author:** ![silik1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/silik1/32/482168_2.png) [@silik1](https://forums.unrealengine.com/u/silik1)\
**Post date:** [October 22, 2019, 8:53am UTC](https://forums.unrealengine.com/t/help-with-interfaces/132433/2 "2019-10-22T08:53:09Z")

</div>

Hi,  
Your ATrap must inherites the interface, aka:

ATrap.h:

```auto

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"

#include "GameFramework/Actor.h"

#include "ATrap.generated.h"

UCLASS()

class SPACEPROJECT_API AATrap : public AActor, public IReactToTriggerInterface

...]

```

The error makes sense, because Atrap cannot overridee a method it never heard about 🙂  
Implementing the interface should solve that.

---

<div class="post-metadata">

**Author:** ![GoldX18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GoldX18](https://forums.unrealengine.com/u/GoldX18)\
**Post date:** [October 23, 2019, 8:30pm UTC](https://forums.unrealengine.com/t/help-with-interfaces/132433/3 "2019-10-23T20:30:36Z")

</div>

Thanks for the answer. It turns out not only did I miss some code in my examples, I also wasn’t understanding interfaces correctly and had been trying to do what abstract classes achieve.
