diff --git a/Operations_on_polyhedra/examples/Operations_on_polyhedra/orient_polygon_soup_test.cpp b/Operations_on_polyhedra/examples/Operations_on_polyhedra/orient_polygon_soup_test.cpp index 5774301bb84..55d2dde58f1 100644 --- a/Operations_on_polyhedra/examples/Operations_on_polyhedra/orient_polygon_soup_test.cpp +++ b/Operations_on_polyhedra/examples/Operations_on_polyhedra/orient_polygon_soup_test.cpp @@ -46,11 +46,11 @@ std::istream& read_soup( return stream; } -int main() { +int main(int,char** argv) { std::vector points; std::vector< std::vector > polygons; - std::ifstream input("data/elephant_soup.off"); + std::ifstream input(argv[0]); if ( !input || !read_soup(input, points, polygons)){ std::cerr << "Error: can not read file."; return 1; @@ -64,7 +64,7 @@ int main() { CGAL::Polygon_soup_to_polyhedron_3 builder(points, polygons); poly.delegate(builder); - std::ofstream out("data/elephant_oriented.off"); + std::ofstream out("oriented.off"); out << poly; out.close(); } diff --git a/Operations_on_polyhedra/examples/Operations_on_polyhedra/orient_polyhedron_3_test.cpp b/Operations_on_polyhedra/examples/Operations_on_polyhedra/orient_polyhedron_3_test.cpp index 08b8603dc20..756c4de676a 100644 --- a/Operations_on_polyhedra/examples/Operations_on_polyhedra/orient_polyhedron_3_test.cpp +++ b/Operations_on_polyhedra/examples/Operations_on_polyhedra/orient_polyhedron_3_test.cpp @@ -27,13 +27,12 @@ void test(const char* file_name) { std::cerr << file_name << " passed the test." << std::endl; } -int main() { - std::vector files; +int main(int argc, char** argv) { files.push_back("data/elephant.off"); files.push_back("data/camel.off"); - for(std::vector::iterator it = files.begin(); it != files.end(); ++it) { - test(it->c_str()); + for(int i=1;i& points) { in.close(); } -int main() { - std::ifstream input("data/elephant.off"); +int main(int, char** argv) { + std::ifstream input(argv[1]); Polyhedron poly; if ( !input || !(input >> poly) || poly.empty() ){ std::cerr << "Error: can not read file."; diff --git a/Operations_on_polyhedra/examples/Operations_on_polyhedra/self_intersection_polyhedron_test.cpp b/Operations_on_polyhedra/examples/Operations_on_polyhedra/self_intersection_polyhedron_test.cpp index 1e8f766ce7c..e327e5fde12 100644 --- a/Operations_on_polyhedra/examples/Operations_on_polyhedra/self_intersection_polyhedron_test.cpp +++ b/Operations_on_polyhedra/examples/Operations_on_polyhedra/self_intersection_polyhedron_test.cpp @@ -16,8 +16,8 @@ typedef K::Triangle_3 Triangle; typedef CGAL::Polyhedron_3 Polyhedron; typedef Polyhedron::Facet_const_handle Facet_const_handle; -int main() { - std::ifstream input("data/camel.off"); +int main(int, char** argv) { + std::ifstream input(argv[1]); Polyhedron poly; if ( !input || !(input >> poly) || poly.empty() ){ std::cerr << "Error: can not read file.";