What is the correct way to initialize any object (2D vector in this case)?

Getting compilation error: " no match for ‘operator!=’ "

```
class Solution {
public:
vector<vector<int>> *dp;
Solution(){
dp = new vector<vector<int>>(5001,vector<int>(501,-1));
}
int f(int c,int indx,const vector<int> &v){
if(c==0)return 1;
if(indx>=v.size())return 0;
if(c<0)return 0;
if(dp[c][indx]!=-1)return dp[c][indx];//ERROR HERE: " no match for 'operator!=' "
int ans=f(c,indx+1,v)+f(c-v[indx],indx,v);
dp[c][indx]=ans;
return ans;
}
int change(int amount, vector<int>& coins) {
return f(amount,0,coins);
}
};
```