Dear all For example, I have a struct struct point{int x;int y} point a;
Is there an easy way to access x and y by using a["x"] and a["y"] I guess I need to overload [], but can't figure out how. Someone can help? Thank you very much
grampus via Digitalmars-d-learn Sat, 24 Sep 2016 21:56:23 -0700
Dear all For example, I have a struct struct point{int x;int y} point a;
Is there an easy way to access x and y by using a["x"] and a["y"] I guess I need to overload [], but can't figure out how. Someone can help? Thank you very much