For Loop (For Collection)

Might be worth mentioning the For each type loop. Does work also and removes the need to reference index.

	for (TCHAR WordChar : HiddenWord)
	{
        PrintLine(TEXT("%c"),WordChar);
	}

in essence its,

foreach TCHAR Variable in Collection(HiddenWord) Do.

Not sure if there is any issues using this with the Unreal Engine. (From personal testing it seems to work)

Continued lessons show that it may not be the optimized approach as it would when nested check all indexes i.e. the first letter again against the first letter as it simply iterates through the collection.

Privacy & Terms