What is the proper way to implement an interface function that returns a struct in C++?

Althaen
Mon, 16 Aug 2021 02:09:08 +0000
UI

I can’t find any examples of how to do this anywhere but I did find something in the engine and tried to copy the syntax but I can’t get it to work.

I get this error

unresolved external symbol "public: virtual struct FEntityData const & __cdecl IIEntity::GetEntityData(void)const " (?GetEntityData@IIEntity@@UEBAAEBUFEntityData@@XZ)

Declaration in class implementing

	virtual const struct FEntityData& GetEntityData() const override;

Implementation in class implementing

const FEntityData& AGameCharacter::GetEntityData() const
{
	return EntityData;
}

Declaration in interface class

	virtual const FEntityData& GetEntityData() const;

2 posts - 1 participant