struct template help

seany via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 12 12:09:43 PDT 2014


Please consider the following

struct arc(T,U)
{

T some_var;
U  someother_var;
}

/* things */

class myclass
{
   this(){}
  ~this(){}
   void MYfunction()

   {
     arc!(string, string[]) * a;
     a.some_var = "hello";
   }
}


void main()
{
   c = new myclass();
   c.MYfunction();
}


This leads to a segmentation fault.

What am I doing wrong?


More information about the Digitalmars-d-learn mailing list