summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/example/Alpha_complex_from_off.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Alpha_complex/example/Alpha_complex_from_off.cpp')
-rw-r--r--src/Alpha_complex/example/Alpha_complex_from_off.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Alpha_complex/example/Alpha_complex_from_off.cpp b/src/Alpha_complex/example/Alpha_complex_from_off.cpp
index 18a1a20d..963ef5ca 100644
--- a/src/Alpha_complex/example/Alpha_complex_from_off.cpp
+++ b/src/Alpha_complex/example/Alpha_complex_from_off.cpp
@@ -4,17 +4,15 @@
#include <iostream>
#include <string>
-void usage(char * const progName) {
+void usage(int nbArgs, char * const progName) {
+ std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n";
std::cerr << "Usage: " << progName << " filename.off alpha_square_max_value [ouput_file.txt]\n";
std::cerr << " i.e.: " << progName << " ../../data/points/alphacomplexdoc.off 60.0\n";
exit(-1); // ----- >>
}
int main(int argc, char **argv) {
- if ((argc != 3) && (argc != 4)) {
- std::cerr << "Error: Number of arguments (" << argc << ") is not correct\n";
- usage(argv[0]);
- }
+ if ((argc != 3) && (argc != 4)) usage(argc, (argv[0] - 1));
std::string off_file_name(argv[1]);
double alpha_square_max_value = atof(argv[2]);