Matthias Pleh wrote: > class B{ string toString() {return "screen output routine here";}}
Isn't the 'override' keyword required? (Perhaps required only in D2?) I find string.format very helpful in toString() member functions.Finally, I still don't know whether the 'const'ness of the member function is required, allowed, or completely wrong. :)
import std.string; class A { override string toString() const { return format("My %s formatted string: %s", "lovely", 42); } } Ali