]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Simplify filename creation
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 6 Nov 2006 04:23:33 +0000 (04:23 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 6 Nov 2006 04:23:33 +0000 (04:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@14153 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-24/step-24.cc

index 5c5d0eeceac8bba2c982d40917cdaaeca9423f7e..169c3fb0e0c2477946d4d0c51b70e3142c389607 100644 (file)
@@ -45,7 +45,6 @@
 
 #include <fstream>
 #include <iostream>
-#include <sstream>
 
                                 // This is the only new one: We will need a
                                 // library function defined in a class
@@ -532,11 +531,10 @@ void TATForwardProblem<dim>::output_results () const
 
   data_out.build_patches ();
 
-  std::ostringstream filename;
-  filename << "solution-"
-          << Utilities::int_to_string (timestep_number, 3)
-          << ".gnuplot";
-  std::ofstream output (filename.str().c_str());
+  std::string filename =  "solution-" +
+                         Utilities::int_to_string (timestep_number, 3) +
+                         ".gnuplot";
+  std::ofstream output (filename.c_str());
   data_out.write_gnuplot (output);
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.