What's inside the ActorItr iterator variable and what * ActorItr returns?

for (TActorIterator ActorItr(GetWorld()); ActorItr; ++ActorItr)
{
// Same as with the Object Iterator, access the subclass instance with the * or → operators.
AStaticMeshActor *Mesh = *ActorItr;
ClientMessage(ActorItr->GetName());
ClientMessage(ActorItr->GetActorLocation().ToString());
}
AStaticMeshActor *Mesh = *ActorItr

In the code above Mesh is a pointer of type AStaticMeshActor. Therefore you must receive a memory address.
But my doubts is why use the * operator?
why not just use ActorItr or & (* ActorItr)?
Does *ActorItr return the address of the pointed object or returns the object pointed to by Actoritr?
Since unreal will assign the object itself
to a variable that expects to receive a memory address?
Thank you…

I understand … TActorIterator is a class template ActorItr is an iterator in this way it will not behave like a common pointer … ActorItr points to a container of pointers to the specified type. In this way the * operator will do the dereferencing and will bring the address pointing to ActorIt

AStaticMeshActor * Mesh = * ActorItr
Means that Mesh will have inside it a pointer to a StaticMeshActor currently pointed to by ActorIt.
It does not make sense to use only ActorItr because it is an iterator with special characteristics that has operators * and →

Thank you

Hi! marcostim,Sorry,I still have some questions.
I can not understand the operation AStaticMeshActor * Mesh = * ActorItr;I understand ActorItr get the value of actorItr pointed,But why it equels to a Pointer(AstaticMeshActor)

Hi! marcostim,Sorry,I still have some questions.
I can not understand the operation AStaticMeshActor * Mesh = * ActorItr;I understand ActorItr get the value of actorItr pointed,But why it equels to a Pointer(AstaticMeshActor)