From 3c3d7adc14cd9ddaceff165d827123243a0b8ed2 Mon Sep 17 00:00:00 2001 From: markandpathak Date: Thu, 25 Aug 2016 14:48:45 +0530 Subject: [PATCH] Constant Expression Error While building the code old line gives constant expression error due to variable declaration of array. New line will do it by allocating memory of nVar size. --- src/solver_structure.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/solver_structure.cpp b/src/solver_structure.cpp index eb8c410..48a2302 100644 --- a/src/solver_structure.cpp +++ b/src/solver_structure.cpp @@ -1226,8 +1226,7 @@ CBaselineSolver::CBaselineSolver(CGeometry *geometry, CConfig *config, unsigned /*--- Set the number of variables, one per field in the restart file (without including the PointID) ---*/ nVar = config->fields.size() - 1; - double Solution[nVar]; - + Solution = new double[nVar]; /*--- Read all lines in the restart file ---*/ iPoint_Global = 0; while (getline (restart_file, text_line)) {