Pointer to array

BlitzMax Forums/BlitzMax Beginners Area/Pointer to array

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.

You dont need to use a pointer to the first element, as the variable itself points to it,
and if the array and the pointer are of the same type, you dont need any typecasting:
Local a:Byte[10]
Local p:Byte Ptr = a


Btw, your above code is missing a VarPtr, and since it returns a Byte Ptr no need to typecast it:
udtLVItem.pszText = Int(VarPtr baBuffer[0])
Assuming pszText is an integer.