Support Board
Date/Time: Sat, 01 Nov 2025 01:28:38 +0000
Post From: corruption of variables on simple code using standard arrays
| [2022-03-01 13:23:21] |
| User907968 - Posts: 847 |
|
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. |
