Name: Anonymous 2006-11-11 13:17
Hi!
I'm trying to make two objects of two different classes who both point to each other; something like this:
#pragma once
#include "b.h"
Class a
{
a(b* _ptr){ b = _ptr; }
b* ptr;
};
____________
#pragma once
#include "a.h"
Class b
{
b(a* _ptr){ a = _ptr; }
a* ptr;
};
(Please forgive any syntax errors..)
Anyway; i can't include both .h files into each, it of course fucks the compiler up. So how would one go about doing this? I know i could just point directly into memory using some kind of empty template, but im not sure how to go about doing this
I'm trying to make two objects of two different classes who both point to each other; something like this:
#pragma once
#include "b.h"
Class a
{
a(b* _ptr){ b = _ptr; }
b* ptr;
};
____________
#pragma once
#include "a.h"
Class b
{
b(a* _ptr){ a = _ptr; }
a* ptr;
};
(Please forgive any syntax errors..)
Anyway; i can't include both .h files into each, it of course fucks the compiler up. So how would one go about doing this? I know i could just point directly into memory using some kind of empty template, but im not sure how to go about doing this