Dynamic Arrays in User Defined Types - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html) +--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html) +--- Thread: Dynamic Arrays in User Defined Types (/thread-6369.html) |
Dynamic Arrays in User Defined Types - Dr_Davenstein - 03-10-2005 Hmmm.... This wont run. :???: Code: Type Surface_Properties Dynamic Arrays in User Defined Types - relsoft - 03-10-2005 Ptr. Code: Vec as Vector3DType ptr You forgot to declare as Ptr Dynamic Arrays in User Defined Types - Dr_Davenstein - 03-10-2005 He he he... now this crashes. :roll: Code: Type Surface_Properties Dynamic Arrays in User Defined Types - relsoft - 03-10-2005 You forgot to allocate model_type ptr Code: Dim Model(1 to 10) as Model_Type ptr Dynamic Arrays in User Defined Types - Dr_Davenstein - 03-10-2005 Oh, Thanks!!! I didn't know I had to do that too. :rotfl: EDIT: It seems to work good and that's a nice clean structure. Thanks again. Dynamic Arrays in User Defined Types - lkd85 - 03-10-2005 BTW, for Matrices you can also use a 2D pointer array. This is what I'm using in my bootleg 3d math library Code: #define MATRIX4X4 Single Ptr Ptr |