So first of all I must say that I’m not an experienced c++ programmer. So maybe I just don’t understand something. But I was going through the shootergame code.
Then in the in the ShooterProjectile.cpp I found the definition
void AShooterProjectile::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{…}
Then I took a look at the corresponding headerfile and was suprised that no overriding function was declared there.
So I thought maybe you don’t have to redeclare virtual functions. But for better reading I still wanted to redeclare the GetLifetimeReplicatedProps function. So I put the following in the corresponding headerfile
virtual void GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const OVERRIDE;
Now the code doesn’t compile anymore. The error is C2535: “member function already defined or declared”.
I don’t think that should happen.
After quite some time I found the problem. The ShooterProjectile.generated.h already has the declaration in it. But I don’t know why.
I find this quite problematic. I need to know which function I can declare and which ones are autogenerated.
Thanks in advance