Pointer to array
BlitzMax Forums/BlitzMax Beginners Area/Pointer to array
| ||
Hi, I allready read the tutorial http://www.blitzmax.com/Community/posts.php?topic=54348 but I found no solution - maybe because of English is not my native language ... I need a pointer to an array but can't make it working: udtLVItem.pszText = Int(Byte Ptr(baBuffer[0])) Don't work... What is the right way for? Thanks, Andre |
| ||
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. |