AAStar* cur = GetWorld()->SpawnActor<AAStar>(AAStar::StaticClass(), FVector::ZeroVector, FRotator::ZeroRotator);
TArray<AAStar*> stellarBodiesRef;
stellarBodiesRef.Add(cur);
Try this.
What you store in a container is irrelevant, they are generic. Which container is most suitable will depend on what operations you need to perform on the collection.