From 35c75c5d30236dd29ad8e4d4f12de8223e73b58e Mon Sep 17 00:00:00 2001 From: skachano Date: Thu, 2 Apr 2015 12:38:30 +0000 Subject: Added also changes in the cpp file git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@539 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e32f574c7cf93f67de3d08b43f9c6de5a4a8396d --- src/Witness_complex/example/witness_complex_from_file.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/Witness_complex/example/witness_complex_from_file.cpp') diff --git a/src/Witness_complex/example/witness_complex_from_file.cpp b/src/Witness_complex/example/witness_complex_from_file.cpp index e2a80e92..cec1d1b8 100644 --- a/src/Witness_complex/example/witness_complex_from_file.cpp +++ b/src/Witness_complex/example/witness_complex_from_file.cpp @@ -23,6 +23,9 @@ #include #include #include + +//#include + //#include "gudhi/graph_simplicial_complex.h" #include "gudhi/Witness_complex.h" @@ -86,5 +89,13 @@ int main (int argc, char * const argv[]) end = clock(); std::cout << "Howdy world! The process took " << (double)(end-start)/CLOCKS_PER_SEC << " s. \n"; - + char buffer[100]; + int i = sprintf(buffer,"%s_%s_result.txt",argv[1],argv[2]); + if (i >= 0) + { + std::string out_file = (std::string)buffer; + std::ofstream ofs (out_file, std::ofstream::out); + witnessComplex.st_to_file(ofs); + ofs.close(); + } } -- cgit v1.2.3