From 275a2b4b181d7f09b025ef61b063d74df7c8afdb Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 12 May 2008 21:38:47 +0000 Subject: [PATCH] Properly initialize array. git-svn-id: https://svn.dealii.org/trunk@16086 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-33/step-33.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deal.II/examples/step-33/step-33.cc b/deal.II/examples/step-33/step-33.cc index 75167f12b9..e02d932901 100644 --- a/deal.II/examples/step-33/step-33.cc +++ b/deal.II/examples/step-33/step-33.cc @@ -1817,12 +1817,13 @@ void ConsLaw::load_parameters(const char *infile){ // Initial conditions. prm.enter_subsection("initial condition"); { - std::vector expressions; + std::vector expressions (EulerEquations::n_components, + "0.0"); for (unsigned int di = 0; di < EulerEquations::n_components; di++) { char var[512]; std::sprintf(var, "w_%d value", di); - expressions.push_back (prm.get(var)); + expressions[di] = prm.get(var); } initial_conditions.initialize (FunctionParser::default_variable_names(), expressions, -- 2.39.5