This is giving me an error that expression a
must have a constant value. I cannot understand what is wrong with this method. n
is an integer and I am giving it the array size. Can somebody help me to understand this problem?
int fib(int n)
{
const int a = n;
int f[a];
...
}