mirror of https://github.com/CGAL/cgal
* In order for the examples to run sucessfully without any input arguments (which were required previously), the snap_rounding_data.cpp will run for the default input data file i.e. data/snap_rounding_data. In case of data file as input arguments, the user specified data file will be chosen
This commit is contained in:
parent
a403913539
commit
b08dd99dcc
|
|
@ -0,0 +1,5 @@
|
|||
4
|
||||
0 0 10 10
|
||||
0 10 10 0
|
||||
3 0 3 10
|
||||
7 0 7 10
|
||||
|
|
@ -51,9 +51,10 @@ typedef std::list<Polyline_2> Polyline_list_2;
|
|||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if(argc > 3 || argc < 2)
|
||||
//if(argc > 3 || argc < 2)
|
||||
if(argc > 3)
|
||||
{
|
||||
std::cout<< "Incorrect input. <Arg 1> path to the INPUT file. <Arg 2> (optional) path to the OUTPUT file" << std::endl;
|
||||
std::cout<< "Incorrect input. <Arg 1> path to the INPUT file. <Arg 2> (optional) path to the OUTPUT file. No arguments to choose the default data file" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +64,10 @@ int main(int argc, char* argv[])
|
|||
std::ifstream my_read_file;
|
||||
std::ofstream my_write_file;
|
||||
|
||||
if(argc > 1)
|
||||
my_read_file.open(argv[1]);
|
||||
else
|
||||
my_read_file.open("data/snap_rounding_data");
|
||||
|
||||
if(!my_read_file.is_open())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue