Map (Container)
In C++, here is how to iterate through all entries in a TMap. TMap MyMapVariable; float PlayerScore = 0; for (TPair& IteratedPair : MyMapVariable) { PlayerScore += IteratedPair.Value; Destroy(I...
In C++, here is how to iterate through all entries in a TMap.
TMap MyMapVariable;
float PlayerScore = 0;
for (TPair& IteratedPair : MyMapVariable)
{
PlayerScore += IteratedPair.Value;
Destroy(IteratedPair.Key);
}
If your map variable is const, make the pair
const TPair&