From 87e1ca2d10029c8bbcfb5757c49a4c6fb850aa5f Mon Sep 17 00:00:00 2001 From: Ophir Setter Date: Sat, 13 Aug 2011 06:30:57 +0000 Subject: [PATCH] argv to the benchmark program --- .../benchmark/Minkowski_sum_2/sum_by_decomposition.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Minkowski_sum_2/benchmark/Minkowski_sum_2/sum_by_decomposition.cpp b/Minkowski_sum_2/benchmark/Minkowski_sum_2/sum_by_decomposition.cpp index 4015b9d0d93..3417fe5da6a 100644 --- a/Minkowski_sum_2/benchmark/Minkowski_sum_2/sum_by_decomposition.cpp +++ b/Minkowski_sum_2/benchmark/Minkowski_sum_2/sum_by_decomposition.cpp @@ -16,11 +16,17 @@ typedef Kernel::Point_2 Point_2; typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; -int main () +int main (int argc, char * argv[]) { CGAL::Timer t_mink_sum; + // Open the input file. - std::ifstream in_file ("data/random2.dat"); + if (argc < 2) { + std::cerr << "Failed to open the input file." << std::endl; + return (1); + } + + std::ifstream in_file (argv[1]); if (! in_file.is_open()) {