For loop inside fork join_none

In reply to dave_59:

In reply to pawan:

fork 
thread1();
thread2();
join_none
for(int i=0;i<32;i++)
fork
int j = i;
thread3(j);
join_none

hi dave why cant we simply use thread3(i) why are we declaring another variable and assing i to j. i am still not clear on this part