spectral

Dynamic 'int' array in kernel ?

Discussion created by spectral on Oct 20, 2010
Latest reply on Oct 21, 2010 by Illusio

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

 

Outcomes