digitalmars.D - Setting a dynamic array from a pointer to data...
- Paolo Invernizzi <arathorn NOSPAM_fastwebnet.it> Apr 03 2006
- Oskar Linde <oskar.lindeREM OVEgmail.com> Apr 03 2006
- Paolo Invernizzi <arathorn NOSPAM_fastwebnet.it> Apr 04 2006
- "Jarrett Billingsley" <kb3ctd2 yahoo.com> Apr 04 2006
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








"Jarrett Billingsley" <kb3ctd2 yahoo.com>