Hi everyone,
How do you define two structs that include lists of or pointers to each other? I've tried including a forward declaration of one, and neither way works. Any help getting around this would be great, thanks in advance!
// struct arc;
struct node {
Vector<arc> arcs;
void toString() {
for(int i=0; i<arcs.size(); i++) {
arcs[i].toString();
}
}
};
struct arc {
node *one;
node *two;
void toString() {
cout << one->name << two->name;
}
};