How do I overload += operator?

bachmeier no at spam.net
Tue Jan 26 14:13:09 UTC 2021


On Monday, 25 January 2021 at 17:09:22 UTC, Jack wrote:
> I'd like to make this work s += 10 where s is a struct. How can 
> I do that?

You have your answer, but someone else might come upon this in 
the future, so here's a link to the clearest explanation of 
operator overloading for someone new to the language:

http://ddili.org/ders/d.en/operator_overloading.html




More information about the Digitalmars-d-learn mailing list