From bcebc261b17dabc7d24c90fc0ee93b351da09a1b Mon Sep 17 00:00:00 2001 From: Ester Ezra Date: Sun, 6 Oct 2002 19:00:29 +0000 Subject: [PATCH] Changing iostream.h --> iostream Fixing some names of typedefs (polygon --> Polygon_2 etc). --- .../examples/Polygons_bops/example1.C | 14 +++++++------- .../examples/Polygons_bops/example2.C | 14 ++++++++------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Packages/Map_overlay_2/examples/Polygons_bops/example1.C b/Packages/Map_overlay_2/examples/Polygons_bops/example1.C index 64d3480ac86..951063e7f8e 100644 --- a/Packages/Map_overlay_2/examples/Polygons_bops/example1.C +++ b/Packages/Map_overlay_2/examples/Polygons_bops/example1.C @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include @@ -17,8 +17,8 @@ typedef CGAL::Quotient NT; typedef CGAL::Cartesian K; typedef K::Point_2 Point_2; -typedef CGAL::Polygon_2 Polygon; -typedef Polygon::Segment_2 Segment_2; +typedef CGAL::Polygon_2 Polygon_2; +typedef Polygon_2::Segment_2 Segment_2; typedef CGAL::Polygons_bops_traits_2 Bops_traits; @@ -26,7 +26,7 @@ using std::cin; using std::cout; using std::endl; -void read_polygon(Polygon& polygon) +void read_polygon(Polygon_2& polygon) { unsigned int n; @@ -41,7 +41,7 @@ void read_polygon(Polygon& polygon) int main() { - Polygon poly1, poly2; + Polygon_2 poly1, poly2; read_polygon(poly1); read_polygon(poly2); @@ -50,7 +50,7 @@ int main() cout< polygons; + std::list polygons; std::list curves; std::list points; @@ -64,7 +64,7 @@ int main() cout<<"The number of resulting polygons: "<< polygons.size()<::iterator iter = polygons.begin(); + for (std::list::iterator iter = polygons.begin(); iter != polygons.end(); ++iter) cout << *iter << endl; diff --git a/Packages/Map_overlay_2/examples/Polygons_bops/example2.C b/Packages/Map_overlay_2/examples/Polygons_bops/example2.C index d4d39bfcc33..2b2062c5f3b 100644 --- a/Packages/Map_overlay_2/examples/Polygons_bops/example2.C +++ b/Packages/Map_overlay_2/examples/Polygons_bops/example2.C @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include @@ -17,8 +17,8 @@ typedef CGAL::Quotient NT; typedef CGAL::Cartesian K; typedef K::Point_2 Point_2; -typedef CGAL::Polygon_2 Polygon; -typedef Polygon::Segment_2 Segment_2; +typedef CGAL::Polygon_2 Polygon_2; +typedef Polygon_2::Segment_2 Segment_2; typedef CGAL::Polygons_bops_traits_2 Bops_traits; @@ -26,7 +26,7 @@ using std::cin; using std::cout; using std::endl; -void read_polygon(Polygon& polygon) +void read_polygon(Polygon_2& polygon) { unsigned int n; @@ -41,7 +41,7 @@ void read_polygon(Polygon& polygon) int main() { - Polygon poly1, poly2; + Polygon_2 poly1, poly2; read_polygon(poly1); read_polygon(poly2); @@ -50,7 +50,7 @@ int main() cout< polygons; + std::list polygons; std::list curves; std::list points; @@ -63,3 +63,5 @@ int main() return 0; } + +