静的に確保した場合はできます。
コード: 全て選択
Type HOGE
n as Long
End Type
dim a[1] as HOGE
dim h as HOGE
dim p as *HOGE
p = malloc(SizeOf(HOGE) * 2)
a[0] = h 'OK
p[0] = h 'ERR "h" 型が違います
free(p)
コード: 全て選択
Type HOGE
n as Long
End Type
dim a[1] as HOGE
dim h as HOGE
dim p as *HOGE
p = malloc(SizeOf(HOGE) * 2)
a[0] = h 'OK
p[0] = h 'ERR "h" 型が違います
free(p)