what's the difference between:
// main.h
#ifndef X_H
#define X_H
#include "point.h" // supposing that point.h contains the declaration of Point class
class MyClass
{
private:
Point m_Point;
//...
};
#endif
// main.cpp
#include "main.h"
//...
and
// main.h
#ifndef X_H
#define X_H
class Point;
class MyClass
{
private:
Point m_Point;
//...
};
#endif
// main.cpp
#include "main.h"
#include "point.h"
//...
i mean difference in performance, manners of writing and so on.., i already know that the first case is used to avoid circular referencing when used with pointers/references