BeginOverlap function does not get called for the character C++ CapsuleComponent

The constructor is run when the class is created. So the event your are assigning doesn’t exist during the constructor but does during begin play.