Is there an easy way to convert a pointer to malloc'd memory to an array?

Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 24 11:42:41 PDT 2016


I have a T* pointer to the start of a malloc'd chunk of memory, 
the type T and the number of T's stored in the chunk.

Is there an efficient way of converting this information to a D 
array of type T[] or even T[n]?


More information about the Digitalmars-d-learn mailing list