Setting a dynamic array from a pointer to data...

Paolo Invernizzi arathorn at NOSPAM_fastwebnet.it
Tue Apr 4 06:45:42 PDT 2006


And no copy is appening I guess?

Oskar Linde wrote:
> Paolo Invernizzi skrev:
>> Hi all,
>>
>> I have a unsigned char* buffer from an external library that I know is 
>> sized, for example, 100.
>>
>> What is the best way to turn it in a ubyte[] dynamic array?
> 
> ubyte *buffer = whatever();
> 
> ubyte[] dynBuffer = buffer[0..100];
> 
> /Oskar



More information about the Digitalmars-d mailing list