I'm trying to figure out how to create a structure with multidimensional array.
I got it working for 1D array:
struct example1 {
var user: [String]
}
but when I try to create an array with String, String, Int and a Bool it gives me "Expected ']' in array type" error
struct example2 {
var user: [[String], [String], [Int],[Bool]]
}
How to create empty multidimensional array that would work in structure like mine?
structrather than multiple arrays.Userstruct, with properties you want (my guess is probablyfirstName: String,lastName: String,age: Intand some other boolean). You can then make an array ofUserstructs.