I need to do something like this:
count: i32le
data: [dynamic]f64le
n,e := os.read_ptr( file, rawptr(&count), size_of(count))
resize(&data, count)
fmt.println("len =", len(data))
// now, read <count> f64s into the array
bytesToRead := int(count * size_of(f64le))
n,e = os.read_ptr(file, rawptr(&data), bytesToRead)
fmt.println("len =", len(data)) // ????????????
Obviously, reading into a dynamic array this way is not working. How do I go about to do this? I think, under the hood, the dynamic array is a struct width the pointer to the actual data, so I need to get the pointer to the actual data.