«^»
5.1. Class types
#pragma once
#include <iostream>
using namespace std;
class Point
{
public:
    Point(const int pX = 0, const int pY = 0);
    friend ostream& operator <<(ostream &, const Point &);
private:
    int iX;
    int iY;
};
#include "point.h"
Point::Point(const int pX, const int pY)
:iX(pX), iY(pY)
{
}
ostream& operator <<(ostream& os, const Point& pPoint)
{
    os << pPoint.iX << ':' << pPoint.iY;
    return os;
}
#include "point.h"
int main()
{
    Point* tPoint = new Point(100, 200);
    cout << *tPoint << endl;
    Point* tAnotherPoint = tPoint;
    cout << *tAnotherPoint << endl;
    return 0;
}