How to spawn a Blueprint Actor in C++?

Right, sorry. You need to cast the spawned actor to the type of the variable.

MyPistol = Cast<AWeapon>(GetWorld()->SpawnActor(PistolBP.Class))