Associative Array - where's my error?

bearophile bearophileHUGS at lycos.com
Thu Apr 28 05:06:15 PDT 2011


Jesse Phillips:

> I think this just hides the issue. To fix the issue you would need byLine to return a string, since user code my still save and modify the returned value and store it in an AA.

I don't agree. If you perform a cast of the dup-ed char array to a string you will not have problems. The main problem is the missed duplication (and the bad usage of casts in general, for people coming from C/C++).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list