I am a newbie in C++. I am trying to write a C++ program that generates Fibonacci series by effective use of recursion. The program I have written is as follows -

```
#include<iostream>
#include<vector>

class FibonacciDynamic
{
private:
    static std::vector<int> memo(index);
    int index;
public:
    FibonacciDynamic(int a);
    int fib(int a);
    void display();
};

FibonacciDynamic::FibonacciDynamic(int a)
{
    index = a;
}

int FibonacciDynamic::fib(int a)
{
    if (a <= 2)
    {
        return 1;
    }
    else if(memo.at(a-1) != 0)
    {
       return memo.at(a-1);
    }
    else
    {
        memo.at(a-1) = memo[a - 2] + memo[a - 3];
        return memo.at(a-1);
    }
}

void FibonacciDynamic::display()
{
    for (int i = 0; i < index; i++)
    {
        std::cout << "Generating Fibonacci series..." <<std::endl;
        std::cout << fib(i) << std::endl;
    }
}

int main()
{   
    std::cout << "Please, enter the index" << std::endl;
    int a;
    std::cin >> a;
    FibonacciDynamic f(a);
    f.display();
    return 0;
}

```

But, after compiling the code I am getting following errors - 

```
error C2061: syntax error : identifier 'index'
error C2228: left of '.at' must have class/struct/union
error C2109: subscript requires array or pointer type

```

As all the errors are related with static vector that I've used, I think I have not declared it correctly; that's why compiler is not accepting it as vector & giving errors above. So, please help & guide me to correct way of vector usage in above code. Thanks.