Original Post
I'm trying to make two different C++ classes reference each other, but can't figure out how. Basically, I want the method of one class to return an instace of the other class, and that class to be able to return an instance of the first, like this: I'm using DevC++ with MingW for this project. Any ideas on how to get this to work, without having to do something messy like have one or the other return a void?
//class1.h
public class class1
{
class2 getClass2(int index);
}
//class2.h
public class class2
{
class1 getClass1(int index);
}