From: wolf Date: Wed, 9 Jan 2002 07:26:22 +0000 (+0000) Subject: Work around a problem where we have stringstream but where the wrong return type... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3ceb1616507c1f094825fefbeea3e88c2c55355;p=dealii-svn.git 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 --- 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);