Dup'ing an array onto the stack

John Demme me at teqdruid.com
Fri Feb 24 14:19:31 PST 2006

I need to .dup a string on to the stack.  I current have:
char[] str = ...;
char[] stackStr = str.dup; 

But it's a lie, since stackStr is stored on the heap.  How do I get it on
the stack?  I can easily get the space on the stack for it using alloca(),
but how do I tell the array to use a certain place in memory?

John Demme

More information about the Digitalmars-d-learn mailing list