How to use pointers to point to vector of a struct?
    struct Edge;
    
    struct Node {
    	int id;
    	vector<Edge> *edges;
    };
    
    struct Edge {
    	int id;
    	Node* vertex1;
    	Node* vertex2;
    };
    
    int main(){
        vector<Edge> nodeEdgeList;
        Node* nodePtr = new Node;
	    nodePtr->id	= vertex;
	    nodePtr->edges = nodeEdgeList;
    }

I get the following compiler error due to the last line.

    error: cannot convert 'std::vector<Edge, std::allocator<Edge> >' to 'std::vector<Edge, std::allocator<Edge> >*' in assignment


How to use pointers to point to vector of a struct?
===

    struct Edge;
    
    struct Node {
    	int id;
    	vector<Edge> *edges;
    };
    
    struct Edge {
    	int id;
    	Node* vertex1;
    	Node* vertex2;
    };
    
    int main(){
        vector<Edge> nodeEdgeList;
        Node* nodePtr = new Node;
	    nodePtr->id	= vertex;
	    nodePtr->edges = nodeEdgeList;
    }

I get the following compiler error due to the last line.

    error: cannot convert 'std::vector<Edge, std::allocator<Edge> >' to 'std::vector<Edge, std::allocator<Edge> >*' in assignment

