[EMAIL PROTECTED] a écrit :
> Hi List,
> 
> I need to convert an array passed to an ndll to an array of the abstract
> type that the array items are... So instead of having an array of value
> types, I now have an array of c++ objects, for example.  Whats the best
> approach for this?  I've tried creating a second array, but don't know
> what size to make it via dynamic arrays, and the object that the array
> will contain does not have a constructor, so
> 
> Object obj = new Object( val_array_size( val_array ) );

Your objects are more likely to be pointers, you you might want to do
the following :

Object **arr = (Object**)malloc(val_array_size(narr) * sizeof(void*));

Or in C++, I think it's ok to do :

Object **arr = new Object*[val_array_size(narr)];

Nicolas

-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to