From: Wolfgang Bangerth 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-Tag: v8.0.0~18473 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24ffc0cd3c48e1450f22bc8930aa4717a97084e8;p=dealii.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);