Pointer to custom Types

BlitzMax Forums/BlitzMax Beginners Area/Pointer to custom Types

lodger(Posted 2008) [#1]
Is there a way to have a pointer that points to a custom type? E.g.:

Type MyType
Field a:Int
Field b:Float
EndType

MyVar:MyType
MyTypePointer:MyType Ptr = Varptr(MyType)


tonyg(Posted 2008) [#2]
AFAIK Myvar *is* the Mytype pointer.
BTW : You've posted in the Tutorial section.


Azathoth(Posted 2008) [#3]
You can't, use references instead.


lodger(Posted 2008) [#4]
Thx and sorry for posting on the wrong forum. Will not happen again (I hope ;)


ImaginaryHuman(Posted 2008) [#5]
If you're trying to look at the content of the type, use the new reflection stuff, otherwise you just have a `mytype` pointer which is a handle to the object.