home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / IDIOMS.ZIP / EV3TRIB.C < prev    next >
C/C++ Source or Header  |  1991-12-04  |  955b  |  28 lines

  1. /* Copyright (c) 1992 by AT&T Bell Laboratories. */
  2. /* Advanced C++ Programming Styles and Idioms */
  3. /* James O. Coplien */
  4. /* All rights reserved. */
  5.  
  6. //************************************************************//
  7. //                                                            //
  8. //     F I L E :    E V 3 T R I B . C                         //
  9. //                                                            //
  10. //         Code for version 3 of class Triangle               //
  11. //                                                            //
  12. //************************************************************//
  13.  
  14. #include "ev3tri.h"
  15.  
  16. Shape
  17. Triangle::make(Coordinate pp1, Coordinate pp2, Coordinate pp3)
  18. {
  19.     Triangle *retval = new Triangle;
  20.     retval->p1 = pp1;
  21.     retval->p2 = pp2;
  22.     retval->p3 = pp3;
  23.     retval->exemplarPointer = this;
  24.     return *retval;
  25. }
  26.  
  27. Triangle::Triangle() {  }  // size and vptr knowledge are in here
  28.