Support Board
Date/Time: Mon, 23 Jun 2025 09:53:06 +0000
Post From: corruption of variables on simple code using standard arrays
[2022-03-01 13:23:21] |
User907968 - Posts: 840 |
for (int i=99;i>=0;i--){ tempi[i+1]=tempi[i]; tTot=tTot+tempi[i]; There is an array bounds error during the first iteration of the for loop. iter 1: i = 99 therefore: i + 1 = 100 100 is beyond the end of the array, so this is undefined behavior. |