Tool/software: Code Composer Studio
This one should be pretty simple. I'm getting a compiler error when trying to declare a variable in a for loop.
I want to do this:
for(int i = 0; i<10; i++) {}
but have to do this instead:
int i = 0;
for(i = 0; i<10; i++) {}
Its just a minor nuisance and it seems to be project dependent (I can do the shorthand declaration in one project but not another). I haven't found the setting to fix that.
Here's the compiler error:
"../file.c", line 1073: error #29: expected an expression
"../file.c", line 1073: error #20: identifier "i" is undefined