Playground 中的这段微不足道的代码让 Running 的轮子永远旋转,并且它从不打印输出。其他创建 2D 数组的尝试在我的实际项目中导致了无限索引循环。由于我的硬件太旧,我不能去 Xcode 10。有没有人有二维数组的工作代码?
import Cocoa
var str = "Hello, playground"
var arr = [[Int?]] ()
arr[1][2] = 17
print(str)
Playground 中的这段微不足道的代码让 Running 的轮子永远旋转,并且它从不打印输出。其他创建 2D 数组的尝试在我的实际项目中导致了无限索引循环。由于我的硬件太旧,我不能去 Xcode 10。有没有人有二维数组的工作代码?
import Cocoa
var str = "Hello, playground"
var arr = [[Int?]] ()
arr[1][2] = 17
print(str)