Visual Studio Code gives me an 'expression must have pointer type' error for the line int size = graph->at(node)->size();. I am aware that I could use references but I want to know how to do it with a pointer.
#include <vector>
using namespace std;
void getPathEdges(vector<vector<int>>* graph, int sink, int count, int node, vector<int>* path) {
if (node == sink) {
path->push_back(count);
}
else {
count++;
int size = graph->at(node)->size();
for (int i=0; i<size; i++) {
getPathEdges(graph, sink, count, i, path);
}
}
}