OnBeginOverlap from c++ not working

Normally you would, yes, but the OP is using AStaticMeshActor as his base class (for some reason) which I assume has a UStaticMeshComponent added by default and set as the root component.