5
을 .last 사용하여 다차원 배열을 수정할 수 없습니다 내 코드 :다음은
var states:[[[Int]]] // I create an empty multidimensional array
states = [[[0,0,0],[0,0,0],[0,0,0]]] // I give it a value
// Why does here it doesn't work ? ('@ivalue $T11' is not identical to 'Int')
states.last![0][0] = 1
// And here it does ?
states[0][0][0] = 1
가 다른 하나에 하나의 경우 나에게 오류를 유발하지 왜을받지는 무엇입니까? 나는 그것이 똑같은 일을 할 것이라고 생각했다 ...
고맙습니다. :) –