Hi all,
I'm trying to create two classes which each of them contain a vector of object of the other class. Below is roughly the idea of what I'm trying to do but it seems that it cannot work as it will end up into infinite recursion or something. What options do I have?
Thanks in advance.
class Subject{
vector<Student> list_of_student;
};
class Student{
vector<Subject> list_of_subject;
};