conflict in declaring classes and inheritance
<p>I have a class Point and Vector
  Vector inherits from  Point and Point uses Vector as friend
  I have one cpp file..how do I resolve this conflict.
  I dont want to use header files
  My Code is :</p>

<pre><code> class Vector:Point
 {
  //something
 };

 class Point
  {
 public:
friend class Vector;

double x;
double y;
Vector Point::operator-( Point Q)        // Vector diff of Points
{
    Vector v;
    v.x = x - Q.x;
    v.y = y - Q.y;
    v.z = z - Q.z;
    v.dimn = max( dimn, Q.dim());
    return v;
}

Point Point::operator+( Vector v)        // +ve translation
{
    Point P;
    P.x = x + v.x;
    P.y = y + v.y;
    P.z = z + v.z;
    P.dimn = max( dimn, v.dim());
    return P;
}

Point Point::operator-( Vector v)        // -ve translation
{
    Point P;
    P.x = x - v.x;
    P.y = y - v.y;
    P.z = z - v.z;
    P.dimn = max( dimn, v.dim());
    return P;
}

Point&amp; Point::operator+=( Vector v)        // +ve translation
{
    x += v.x;
    y += v.y;
    z += v.z;
    dimn = max( dimn, v.dim());
    return *this;
}

Point&amp; Point::operator-=( Vector v)        // -ve translation
{
    x -= v.x;
    y -= v.y;
    z -= v.z;
    dimn = max( dimn, v.dim());
    return *this;
}
</code></pre>

<p>};</p>
