Hi,
Simple question I've always wondered about:
Program 1:Program 2:Code:for (int i=0;i<400;i++) { float value = my_array[i]; //do something with value }Which is more efficient? In the first program, is "value" allocated and deallocated each loop iteration?Code:float value; for (int i=0;i<400;i++) { value = my_array[i]; //do something with value }
Thanks,
Ian