On Thursday, 18 April 2013 at 18:04:03 UTC, Andrej Mitrovic wrote:
On 4/18/13, gedaiu <[email protected]> wrote:
i've done that but i get this error:
Error: function base.Value.Value.toString cannot override a
non-virtual function
Error: function base.Value.Value.toString override only applies
to class member functions
If it's a struct then don't put "override".
Just to provide a bit more info:
Classes all derive from Object, which defines toString. Hence,
you need to override it to define your own.
Structs don't have a parent (or any inheritance at all) and hence
you don't override anything, you just define the method.