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

Oskar Linde oskar.lindeREM at OVEgmail.com
Mon Apr 3 08:50:23 PDT 2006


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