type cpp struct pointer problem

BlitzMax Forums/BlitzMax Programming/type cpp struct pointer problem

canbedeleted(Posted 2009) [#1]
-


grable(Posted 2009) [#2]
Its because blitzmax arrays (and types) are allways allocated from the heap, taking only 4 bytes for each reference.
So in your second example, the pointer to the array is overwritten. causing an exception when accessing it later.

The top example reflects the structure layout of the c struct perfectly. go with that ;)


canbedeleted(Posted 2009) [#3]
-


N(Posted 2009) [#4]
is there no way to get it like it should?
No.


canbedeleted(Posted 2009) [#5]
-