On Sunday, 7 June 2015 at 00:38:17 UTC, Jonathan Villa wrote:

module dt2.DataBlock;

class DataBlock
{
        public DataBlock * NextBlock;
        public DataBlock * PrevBlock;
        public string value;

        this()
        {
                NextBlock = null;
                PrevBlock = null;
                value = null;
        }

        this(string newvalue)
        {
                this();
                value = newvalue;
        }

        ~this()
        {
                value = "";
        }
}

Just an FYI classes are reference types in D so you probably meant

        public DataBlock NextBlock;     // is a class reference

public DataBlock * PrevBlock; //classes are reference types already no need for *
                                                        // is a pointer to a 
class reference


Reply via email to