Creating structs

BCS BCS at pathlink.com
Fri Feb 2 11:27:16 PST 2007


Simen Haugen wrote:
> 
> I see. I stored the pointer in another array, so I thought it wouldn't
 > go out of scope. I guess this only works for object allocated on the
 > heap...?

exactly, struct are stored like ints, on the stack and accessing them is 
invalid after the end of that scope.


More information about the Digitalmars-d-learn mailing list