[Dev-C++] indirect references problem
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Laura L. <lau...@gm...> - 2007-09-26 15:53:05
|
Hello,
I would like to do a double reference, I mean, I have two classes Police and
PoliceMan in two files: Police.h and PoliceMan.h , the class Police have a
vector of pointers of PoliceMan: vector<PoliceMan*>, so Police.h include
PoliceMan.h, and I would like include Police.h into PoliceMan.h but I have
errors; This is that I would like to do:
//Police.h
#include "PoliceMan.h"
class Police{
private:
vector<PoliceMan*> policeMen;
......
//PoliceMan.h
#include "Police.h"
class PoliceMan{
private:
Police* myPolice;
....
Is there any way to do that? Thank you
|