int dfs(int i,int j,vector<vector<int>>& grid)
你是想创建一个二维数组嘛?如果是的话,可以用vector<vector >tv(a, vector(b));这种方式