>>int temp[sizeof(frameScores)+1];
That line is wrong. If frameScores is declared as int frameScores[5] then the above declaration will create an array of 5*sizeof(int) = 20+1 elements. What you want is 6 elements, so the line should be int temp[sizeof((frameScores)/sizeof(frameScores[0]))+1];
Well that will correct that line, but it still will not correct the line frameScores = temp; because the two arrays are not the same size.
Last edited by Ancient Dragon; Sep 8th, 2009 at 10:31 pm.
>>int temp[sizeof(frameScores)+1];
That line is wrong. If frameScores is declared as int frameScores[5] then the above declaration will create an array of 5*sizeof(int) = 20+1 elements. What you want is 6 elements, so the line should be int temp[sizeof((frameScores)/sizeof(frameScores[0]))+1];
Well that will correct that line, but it still will not correct the line frameScores = temp; because the two arrays are not the same size.
thank you. any suggestion on how i could correct it?
If you are attempting to add a new element to frameScores array, such as increase its size from 5 to 6 elements, then make frameScores a pointer and reallocate its size.
If you are attempting to add a new element to frameScores array, such as increase its size from 5 to 6 elements, then make frameScores a pointer and reallocate its size.
the framescore was declared as private with and it size is int[0]. I am new to java, and so far i was able to convert probably around 85% of the code, i was stuck with this part wherein the array from temp is being transfered into framescores.
and if you might find it interesting, here's my C code
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.