digitalmars.D - Setting a dynamic array from a pointer to data...
- Paolo Invernizzi (7/7) Apr 03 2006 Hi all,
- Oskar Linde (4/10) Apr 03 2006 ubyte *buffer = whatever();
- Paolo Invernizzi (2/15) Apr 04 2006
- Jarrett Billingsley (3/4) Apr 04 2006 Nope. It just sets the dynamic array's pointer to that data.
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? Thanks --- Paolo
Apr 03 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
Apr 03 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
Apr 04 2006
"Paolo Invernizzi" <arathorn NOSPAM_fastwebnet.it> wrote in message news:e0tta5$17m2$1 digitaldaemon.com...And no copy is appening I guess?Nope. It just sets the dynamic array's pointer to that data.
Apr 04 2006