Constructors not working

rikki cattermole rikki at cattermole.co.nz
Fri Sep 2 18:39:27 UTC 2022


I think you are wanting opAssign not opBinary.

Also you made a mistake, since its a struct you don't want to new it 
when you construct and return it.

```d
return new Time(secos / 3600, (secos % 3600) / 60, secos % 60);
```

Would be a ``Time*`` not ``Time`` which is what you returned.


More information about the Digitalmars-d-learn mailing list