Hello KaosSpectrum,
thank you, that was very helpful. I also found this link which I am going through now:
https://www.unrealengine.com/en-US/blog/ranged-based-for-loops
I have one more question. When I use a range based for loop like:
for (FInventoryItem Item : InputArray) {
OutputItem = Item;
}
I can’t access the index of the TArray, is that correct? To get access to the Index I have to use an “old” for loop like:
for (int32 ItemIndex = 0; ItemIndex < InputArray.Num(); ItemIndex++)
{
OutputIndex = ItemIndex;
}
Thanks again, Peter