class Link; //forward reference
class Node{
public:
int id;
std::vector<Link*> path;
};
class Link{
public:
Node* endA;
Node* endZ;
};
This tells the compiler that there is a class Link so that make it OK to allow a Link*. But that's about it. If you start using Link methods, then you need to show the compiler the class declaration.