anonymous
2009-10-08 11:22:19 UTC
using namespace std;
class PCB
{
public:
int priority, status;
string ID;
PCB *next, *parent, *firstBorn, *nextSibling, *nextWaiting;
RCB *resources;
};
class RCB
{
public:
bool status;
string ID;
RCB *nextAllocated;
PCB *waitingList;
};
This is the class I am trying to make. Note that the class RCB's waitingList can be perfectly compiled but the class PCB's resources can't because it doesn't recognize RCB yet because RCB is at the bottom of the code. How do I make each class recognize each other so that I can use each class as a public variable?