Hello all,
Does anyone know if there is a way to have a C-like array inside a struct ?
I would like to have the memory for the array allocated alongside the struct, not somewhere else on the heap. The goal is to avoid the extra memory allocation because of the array.
It is fine if the array can not grow like Swift array, of course.
struct MyStruct {
var myValue: Int
var myArray: [Int8] = .init(repeating: 0, count: 100)
// ^ here, I would like the items of myArray allocated inside MyStruct
}