How to access variables from another class in C++

Try TArray<AActor *> Actors; in Line 1 instead. Using APooledObjects would do an implicit upcast of all actors, what would be invalid for actors of a different class and that´s why the compiler refuses to accept this array.