C++ Undefined Type Error
<p>Dear all, i have two classes which are computer and floppy disk. </p>

<p>When i put </p>

<pre><code>#include "FloppyDisk.h"
#include "Computer.h"
</code></pre>

<p>in main, then compiler generates error of computer undeclared</p>

<p>When i </p>

<pre><code>#include "Computer.h"
#include "FloppyDisk.h"
</code></pre>

<p>in main, then compiler generates error of floppy disk undeclared. </p>

<p>What is the problem? 
I have check there is no cyclic dependency between the header file. </p>

<p>These are the implementation file for reference. </p>

<pre><code>#include "EquipmentAttributes.h"
#include "EquipmentVisitor.h"
#include "Computer.h"

#include "BoostHeader.h"

#include &lt;algorithm&gt;

// =============================================
computer::computer()
 : cont()
{
}
// =============================================
void computer::add(equipment* equip)
{
 cont.push_back(equip);
}
// =============================================
void computer::remove(equipment* equip)
{
 vecIte myIte;

 myIte = std::find(cont.begin(), cont.end(), equip);
 cont.erase(myIte); 
}
// =============================================
void computer::accept(equipmentVisitor* visitor)
{
 BOOST_FOREACH(equipment* anEquip, cont)
 {
  anEquip-&gt;accept(visitor);
 }

 visitor-&gt;visitComputer(this);
}
// =============================================
computer::equipVec computer::getCont() const
{
 return cont;
}


#include "FloppyDisk.h"
#include "EquipmentAttributes.h"
#include "EquipmentVisitor.h"

// =============================================
floppyDisk::floppyDisk(const int userPrice, const std::string&amp; userName)
 : state(new equipmentState(userPrice, userName) )
{
}
// =============================================
void floppyDisk::accept(equipmentVisitor* visitor)
{
 visitor-&gt;visitFloppyDisk(this);
}
// =============================================
floppyDisk::equipPtr floppyDisk::getState() const
{
 return state;
}
</code></pre>

<p>Please help. </p>

<p>Thanks. </p>
