【请教】如何在C++中创建这样的按键个事件。如图 
 
 
我想使用 
PlayerInputComponent->BindKey(EKeys::A, IE_Released, this, &AThePlayer::ChangeWeapons); 
然后 
void AThePlayer::ChangeWeapons(){} 
 
 
 
但是一直提示我错误: 
CompilerResultsLog: Error: ThePlayer.cpp.obj : error LNK2019: ?????????ⲿ???? "__declspec(dllimport) public: __cdecl FInputChord::FInputChord(struct FKey,bool,bool,bool,bool)" (__imp_??0FInputChord@@QEAA@UFKey@@_N111@Z)???÷????ں??? "public: virtual void __cdecl AThePlayer::SetupPlayerInputComponent(class UInputComponent *)" (?SetupPlayerInputComponent@AThePl 
ayer@@UEAAXPEAVUInputComponent@@@Z) ?б????? 
CompilerResultsLog: Error: ThePlayer.cpp.obj : error LNK2019: ?????????ⲿ???? "__declspec(dllimport) public: __cdecl FInputChord::FInputChord(struct FInputChord const &)" (__imp_??0FInputChord@@QEAA@AEBU0@@Z)???÷????ں??? "public: struct FInputKeyBinding & __cdecl UInputComponent::BindKey<class AThePlayer>(struct FInputChord,enum EInputEvent,class AThePlayer  
*,void (__cdecl AThePlayer::*)(void))" (??$BindKey@VAThePlayer@@@UInputComponent@@QEAAAEAUFInputKeyBinding@@UFInputChord@@W4EInputEvent@@PEAVAThePlayer@@P84@EAAXXZ@Z) ?б????? 
CompilerResultsLog: Error: ThePlayer.cpp.obj : error LNK2019: ?????????ⲿ???? "__declspec(dllimport) public: __cdecl FInputChord::~FInputChord(void)" (__imp_??1FInputChord@@QEAA@XZ)???÷????ں??? "public: struct FInputKeyBinding & __cdecl UInputComponent::BindKey<class AThePlayer>(struct FInputChord,enum EInputEvent,class AThePlayer *,void (__cdecl AThePlayer: 
:*)(void))" (??$BindKey@VAThePlayer@@@UInputComponent@@QEAAAEAUFInputKeyBinding@@UFInputChord@@W4EInputEvent@@PEAVAThePlayer@@P84@EAAXXZ@Z) ?б????? 
CompilerResultsLog: Error: E:\UE4gongcheng\4.18C++\TheExecutioner\Binaries\Win64\UE4Editor-TheExecutioner-7003.dll : fatal error LNK1120: 3 ???????????ⲿ???? 
CompilerResultsLog: ERROR: UBT ERROR: Failed to produce item: E:\UE4gongcheng\4.18C++\TheExecutioner\Binaries\Win64\UE4Editor-TheExecutioner-7003.dll 
 
我该如何更正?同时我想调用图一中的Key结构体。我又该怎么做 
 
 
 |