Note: This website is archived. For up-to-date information about D projects and development, please visit

Using Objects

Part of CommonErrorsCategory


Objects have to be initialized before they are used.


void main()
   Object o;

    /* An access violation will occur if the following statement is omitted. */

    o = new Object(); 

   printf("%.*s", o.toString);