Mega Code Archive
Complex logic in ostream operator
#include
using namespace std;
class Line {
int x;
public:
Line(int i) { x=i; }
friend ostream &operator<<(ostream &stream, Line o);
};
ostream &operator<<(ostream &stream, Line o)
{
register int i, j;
for(i=0; i