I am working on a C project for a TI TMS320x DSP with the C2000 compiler. I tried to initialized a loop variable directly inside a for loop, but somehow I get a compiler error:
Code:
for (int TabCnt = 0; TabCnt < 10; TabCnt++)
{
x++;
}
Error:
error #20: identifier "TabCnt" is undefined
I figure this might be a wrong compiler setting? If I declare the variable outside of the loop, it works perfectly.