Is it possible to "Get All Actors of Class" from code

I’m pretty new to Unreal Engine and i’m trying to find a way to call this method from a c++ class, and not from blueprint (i’m not going to use them for this project), as explained here:
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html
Is it possible?

Update:
I have found this:
GetWorld()->PersistentLevel->Actors;
i guess it’s the only way to do it. looks nice.

Hi ,

Look at this page

Hope it helps!