comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: array of pointers inside a structure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: array of pointers inside a structure [message #44359] Fri, 10 June 2005 11:21 Go to previous message
Robert Moss is currently offline  Robert Moss
Messages: 74
Registered: February 1996
Member
Francois L. wrote:
> I am defining a structure:
>
>> a = 5
>> struct = {A:a, B:intarr(a),C:ptrarr(a)}
>
>
> Further, I want the first element of the array of pointers (C[0]) to be an
> array of 5x5 elements.
>
> How do I create it ?
>

You probably want to use CREATE_STRUCT(), e.g.

a = 5
c = PTRARR( a, /ALLOCATE_HEAP )
*c[ 0 ] = INTARR( 5, 5 ) ;; You did not specify what kind of array here

struct = CREATE_STRUCT( [ 'A', 'B', 'C' ], a, INTARR( a ), c )

Robert Moss
[Message index]
 
Read Message
Read Message
Previous Topic: array of pointers inside a structure
Next Topic: Need advice about inheritance

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:11:23 PDT 2025

Total time taken to generate the page: 0.00442 seconds