how to write a string to a c pointer?

zhmt via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 5 02:06:56 PST 2015


On Thursday, 5 March 2015 at 09:42:53 UTC, Kagamin wrote:
> string s;
> char[] b = cast(char[])asArray();
> b[0..s.length] = s[];

Thank you very much. I should stop my developing , and read the 
dlang tutorial again.


More information about the Digitalmars-d-learn mailing list