Assigning Value to TArray
In my class header I declare the variable TArray TeamCount; Then in my cpp file I initialize the TArray using TeamCount.AddZeroed(NumTeams); Then I try to increment that value TeamCount[TestPlayerState->GetTeamNum()]++; I get the following error on TeamCount.AddZeroed(NumTeams);
and then I get the following error on TeamCount[TestPlayerState->GetTeamNum()]++;
I don't know why this is happening, I am thinking i declared the variable wrong.
asked Oct 18 '15 at 09:56 PM in C++ Programming
Might need to see some context on both TeamCount's declaration, and the function in which it's being accessed. My first guess is that if the
Follow this question
Once you sign in you will be able to subscribe for any updates here