From 24ffc0cd3c48e1450f22bc8930aa4717a97084e8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 9 Jan 2002 07:26:22 +0000 Subject: [PATCH] Work around a problem where we have stringstream but where the wrong return type of srt() is there. git-svn-id: https://svn.dealii.org/trunk@5362 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-5/step-5.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/deal.II/examples/step-5/step-5.cc b/deal.II/examples/step-5/step-5.cc index 493a03c65f..91ef76fd63 100644 --- a/deal.II/examples/step-5/step-5.cc +++ b/deal.II/examples/step-5/step-5.cc @@ -858,9 +858,18 @@ void LaplaceProblem::output_results (const unsigned int cycle) const // We can get whatever we wrote to // the stream using the ``str()'' - // function. Use that as filename + // function. If the new stringstream + // classes are used, then the result is + // a string which we have to convert to + // a char* using the ``c_str()'' + // function, otherwise the result is a + // char* right away. Use that as filename // for the output stream: +#ifdef HAVE_STD_STRINGSTREAM + std::ofstream output (filename.str().c_str()); +#else std::ofstream output (filename.str()); +#endif // And then write the data to the // file. data_out.write_eps (output); -- 2.39.5