I'm trying to iterate over many variables at once, which are stored in a long array. To initialise them, I'm using a loop which goes over each of them, setting every variable to 0. By default, e.g. using: array[count] = 0 it will only change the value of the table's index. How do I set this variable from inside the table, as in getting the variable stored inside and changing it, not just the table's value at the given index?
int &a = b. So once you copy something into the table it “forgets” where it came from and loses every connection to the original variable.