6 Replies Latest reply on Oct 21, 2010 7:00 PM by Illusio

    Dynamic 'int' array in kernel ?

    spectral

      Hi,

      Here is my code, but it does not compile !

       

       

      int* macthingIds;

      int macthings;

       

      if (!(bxdfType & BXDF_SPECULAR))

      {

      macthingIds = new int[1] {0};

      macthings = 1;

      }

      else

      {

      macthingIds = new int[2] {0, 1};

      macthings = 2;

      }



       

      It sounds that the following syntaxes are incorrect :

      macthingIds = new int[2] {0, 1};
      macthingIds = new int[2]; 

      I have try several stuffs... no success :-P

      Can you tell me which syntax I must use