I am 100% sure this already has an answer somewhere, but I've not been able to find it...
I've created an array and specified its length. Later I want to fill it with values, but I can't use the
array = {1, 2, 3, 4}
syntax any more. There's no pattern to the values going in the array, so they can't be put into a for loop where
for(i=0;i<array.length;i++){
array[i] = someValue[i]
}
Can I avoid writing out array[i] = someValue manually for each i? Basically, is there anything similar to
array = {1,2,3,4}
That I could use, where I just fill the array in one line? If this is incredibly unclear, which it might be, let me know and I'll post the actual code I'm using.