well, to correct you based on the question without making a new answer it would be :
UClass* MyClassToSpawn;
GetWorld()->SpawnActor(MyClassToSpawn,Location, Rotation, SpawnInfo);
well, to correct you based on the question without making a new answer it would be :
UClass* MyClassToSpawn;
GetWorld()->SpawnActor(MyClassToSpawn,Location, Rotation, SpawnInfo);