I’ve noticed that when Stephen copy-pastes his function declaration from the header file over to the cpp file that the input parameters of the function change slightly.
For example, the declared function is as follows:
void DamageTaken(AActor* DamagedActor, float Damage, const UDamage* DamageType, class AController* Instigator, AActor* DamageCauser)
But when he copies and pastes it to the CPP file, it becomes as follows:
void UHealthComponent::DamageTaken(AActor *DamagedActor, float Damage, const UDamage *DamageType, class AController *Instigator, AActor *DamageCauser)
Why do the ‘*’ symbols move to the front of the variable name automatically? And how do I turn that on in VSCode so it’ll do the same for me? I’ve had several instances now where I’ve got a compile error because I copy-pasted my function declaration over to the CPP file as a way to quickly start on my definition but didn’t have this happen automatically, so I didn’t know what was wrong. Had to rewatch the video and caught the detail that there was a change between the copy/pasting action.
Thanks!