diff --git a/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp b/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp index d02136e8426..1d10fde3ece 100644 --- a/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp +++ b/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #ifdef CGAL_USE_GMP #include @@ -25,10 +26,10 @@ typedef CGAL::Min_annulus_d Min_annulus; int main() { // points on the squares [-1,1]^2 and [-2,2]^2 - Point P[8] = { Point(-1,-1), Point(-1,1), Point(1,-1), Point(1,1), + std::array P = { Point(-1,-1), Point(-1,1), Point(1,-1), Point(1,1), Point(-2,-2), Point(-2,2), Point(2,-2), Point(2,2)}; - Min_annulus ma(P, P+8); + Min_annulus ma(P.begin(), P.end()); assert (ma.is_valid()); // get center of annulus diff --git a/Bounding_volumes/examples/Min_annulus_d/min_annulus_d_fast_exact.cpp b/Bounding_volumes/examples/Min_annulus_d/min_annulus_d_fast_exact.cpp index 07bb660370b..88e2a295bb4 100644 --- a/Bounding_volumes/examples/Min_annulus_d/min_annulus_d_fast_exact.cpp +++ b/Bounding_volumes/examples/Min_annulus_d/min_annulus_d_fast_exact.cpp @@ -11,7 +11,7 @@ typedef CGAL::Exact_integer ET; #include #include - +#include // use an inexact kernel... typedef CGAL::Homogeneous K; typedef K::Point_2 Point; @@ -24,10 +24,10 @@ typedef CGAL::Min_annulus_d Min_annulus; int main() { // points on the squares [-1,1]^2 and [-2,2]^2 - Point P[8] = { Point(-1,-1), Point(-1,1), Point(1,-1), Point(1,1), + std::array P = { Point(-1,-1), Point(-1,1), Point(1,-1), Point(1,1), Point(-2,-2), Point(-2,2), Point(2,-2), Point(2,2)}; - Min_annulus ma(P, P+8); + Min_annulus ma(P.begin(), P.end()); assert (ma.is_valid()); // get center of annulus diff --git a/Bounding_volumes/examples/Min_ellipse_2/min_ellipse_2.cpp b/Bounding_volumes/examples/Min_ellipse_2/min_ellipse_2.cpp index a5f5935e5b4..74677b064c9 100644 --- a/Bounding_volumes/examples/Min_ellipse_2/min_ellipse_2.cpp +++ b/Bounding_volumes/examples/Min_ellipse_2/min_ellipse_2.cpp @@ -4,7 +4,7 @@ #include #include - +#include typedef CGAL::Exact_rational NT; typedef CGAL::Cartesian K; typedef CGAL::Point_2 Point; @@ -16,20 +16,20 @@ int main( int, char**) { const int n = 200; - Point P[n]; + std::array P; for ( int i = 0; i < n; ++i) - P[ i] = Point( i % 2 ? i : -i , 0); + P.at(i) = Point( i % 2 ? i : -i , 0); // (0,0), (-1,0), (2,0), (-3,0) std::cout << "Computing ellipse (without randomization)..."; std::cout.flush(); - Min_ellipse me1( P, P+n, false); // very slow + Min_ellipse me1( P.begin(), P.end(), false); // very slow std::cout << "done." << std::endl; std::cout << "Computing ellipse (with randomization)..."; std::cout.flush(); - Min_ellipse me2( P, P+n, true); // fast + Min_ellipse me2( P.begin(), P.end(), true); // fast std::cout << "done." << std::endl; // because all input points are collinear, the ellipse is diff --git a/Bounding_volumes/examples/Min_sphere_d/min_sphere_3.cpp b/Bounding_volumes/examples/Min_sphere_d/min_sphere_3.cpp index 32e92903271..f581df9bd58 100644 --- a/Bounding_volumes/examples/Min_sphere_d/min_sphere_3.cpp +++ b/Bounding_volumes/examples/Min_sphere_d/min_sphere_3.cpp @@ -5,7 +5,7 @@ #include #include - +#include typedef CGAL::Simple_cartesian K; typedef CGAL::Min_sphere_of_points_d_traits_3 Traits; typedef CGAL::Min_sphere_of_spheres_d Min_sphere; @@ -16,16 +16,16 @@ const int d = 3; // dimension of points int main () { - Point P[n]; // n points + std::array P; // n points CGAL::Random r; // random number generator for (int i=0; i P; // n points CGAL::Random r; // random number generator for (int i=0; i