home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c021 / 7.img / EXAMPLES.ZIP / DYNPOINT.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-04  |  556 b   |  25 lines

  1. // DPOINT.CPP -- exercise in Chapter 5, Getting Started
  2.  
  3. #include <iostream.h>
  4. #include <graphics.h>
  5. #include <conio.h>
  6. #include "figures.h"
  7.  
  8. int main()
  9. {
  10. // Assign pointer to dynamically allocated object; call constructor
  11. Point *APoint = new Point(50, 100);
  12.  
  13. // initialize the graphics system
  14. int graphdriver = DETECT, graphmode;
  15. initgraph(&graphdriver, &graphmode, "..\\bgi");
  16.  
  17. // Demonstrate the new object
  18. APoint->Show();
  19. cout << "Note pixel at (50,100). Now, hit any key...";
  20. getch();
  21. delete APoint;
  22. closegraph();
  23. return(0);
  24. }
  25.