1.1 --- a/lemon/lp_cplex.cc Sat Mar 01 20:07:29 2008 +0000
1.2 +++ b/lemon/lp_cplex.cc Sat Mar 01 20:09:40 2008 +0000
1.3 @@ -91,11 +91,11 @@
1.4 CPXgetcolname(env, lp, 0, 0, 0, &storespace, col, col);
1.5
1.6 storespace *= -1;
1.7 - char buf[storespace];
1.8 + std::vector<char> buf(storespace);
1.9 char *names[1];
1.10 int dontcare;
1.11 ///\bug return code unchecked for error
1.12 - CPXgetcolname(env, lp, names, buf, storespace, &dontcare, col, col);
1.13 + CPXgetcolname(env, lp, names, &*buf.begin(), storespace, &dontcare, col, col);
1.14 name = names[0];
1.15 }
1.16
1.17 @@ -402,8 +402,8 @@
1.18 }
1.19 bool LpCplex::_isBasicCol(int i) const
1.20 {
1.21 - int cstat[CPXgetnumcols(env, lp)];
1.22 - CPXgetbase(env, lp, cstat, NULL);
1.23 + std::vector<int> cstat(CPXgetnumcols(env, lp));
1.24 + CPXgetbase(env, lp, &*cstat.begin(), NULL);
1.25 return (cstat[i]==CPX_BASIC);
1.26 }
1.27