object.Error: Access Violation

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Oct 4 17:58:14 PDT 2011


You need to "new" class objects, they're not structures:

import std.stdio;
class TTest
{
  public void Info(T)(string name)
  {
     writeln(typeid(T), "\t", name);
  }
}
void main()
{
  TTest test = new TTest;
  test.Info!(uint)("one");
}

Hopefully you know what that means. :)


More information about the Digitalmars-d-learn mailing list