How to spawn a Blueprint Actor in C++?

In the Inventory (array) of AWeapon I can’t add the Pistol created using this method.