The instructor doesn’t include:
APawnTurret::APawnTurret()
{
// Nothing needed in here.
}
However, without that bit, I get this error and can’t compile.
1>PawnTurret.cpp.obj : error LNK2019: unresolved external symbol "public: __cdecl APawnTurret::APawnTurret(void)" (??0APawnTurret@@QEAA@XZ) referenced in function "public: static void __cdecl APawnTurret::__DefaultConstructor(class FObjectInitializer const &)" (?__DefaultConstructor@APawnTurret@@SAXAEBVFObjectInitializer@@@Z)
1>PawnTurret.gen.cpp.obj : error LNK2001: unresolved external symbol "public: __cdecl APawnTurret::APawnTurret(void)" (??0APawnTurret@@QEAA@XZ)
1>D:\Unreal\Projects\ToonTanks\Binaries\Win64\UE4Editor-ToonTanks.dll : fatal error LNK1120: 1 unresolved externals
I only added that bit of code because APawnTank.cpp had it and the error had this bit:
APawnTurret::APawnTurret(void) in the error message above that made me think to add it.
Is that bit needed? Why does the instructors code compile without it?