if you use const variable to define an array out of main, like that:
1 2 3 4 5 6 7 8 9 10 11 12 | |
gcc will report : Error: variably modified ‘s’ at file scope. But if you use #define, it will be ok. like that:
1 2 3 4 5 6 7 8 9 10 11 12 | |
If you do not want to use #define macro, and you will use a small array, you can use a const variable to define the array size, like that:
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
But if you will allocate a big array in main function, gcc will report a warning :warning: overflow in implicit constant conversion