Setting pointer value to another pointer

BlitzMax Forums/BlitzMax Programming/Setting pointer value to another pointer

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Oh, so you want to allocate a memory buffer and then fill it with pointers to other memory buffers?

MemAlloc() returns a Byte Ptr, so you might need something like:

Global Pointers:Int Ptr=Int Ptr(MemAlloc(1024*4)) '1024 pointers
Pointers[0]=Int(Int Ptr(MemAlloc(1024)) 'store a pointer

?????? Of course, if you decided to use another method that's okay too.

I was finding that for certain conversions you need to translate the byte pointer to an int pointer first.