Tool/software: TI C/C++ Compiler
Hi,
I have a problem with array size assignment, If I define an array variable and assign its size as a constant integer, the code is running as it is expected. However, If I assign the size with variable name, the code does not work.
For example;
int a = 2;
float b[a];
the code snippet that is given above does not work (code stop running or stuck at there) (I also try using different hardware like Arduino, there seems no problem with the same code)
When I change the code like,
float b[2]; (deleting variable 'a')
the code is running properly.
Is there anyone who faced with this kind of problem?