Category : C++ Source Code
Archive   : BLFMATH.ZIP
Filename : SHAPE.H

 
Output of file : SHAPE.H contained in archive : BLFMATH.ZIP
////////////////////////////////////////////////////////////
// shape.h: A class used for testing.
// *** Modified from book code, to take out reference
// counts. (Not needed for our tests here.) ***
// Copyright(c) 1993 Azarona Software. All rights reserved.
////////////////////////////////////////////////////////////
#ifndef H_SHAPE
#define H_SHAPE
#include


struct Shape {
static int objects_needing_destruction, verbose;
int x, y;
Shape();
Shape(const Shape &p);
Shape(int xx, int yy);
virtual ~Shape();
Shape &operator=(const Shape &p);
friend int operator==(const Shape &a, const Shape &b);
friend int operator<(const Shape &a, const Shape &b);
friend int operator>(const Shape &a, const Shape &b);
virtual ostream &Print(ostream &os) const;
virtual int Area() const { return 0; }
};

struct Circle : public Shape {
int r;
Circle();
Circle(const Circle &c);
Circle(int xx, int yy, int rr);
virtual ~Circle();
Circle &operator=(const Circle &c);
friend int operator==(const Circle &a, const Circle &b);
virtual ostream &Print(ostream &os) const;
virtual int Area() const { return 3 * r * r; }
};

ostream &operator<<(ostream &os, const Shape &p);
ostream &operator<<(ostream &os, const Circle &c);

#endif


  3 Responses to “Category : C++ Source Code
Archive   : BLFMATH.ZIP
Filename : SHAPE.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/