| Overview | Group | Index | Concepts | 
The routine CPXgetcols accesses a range of
 columns of the constraint matrix of a CPLEX problem object. The beginning
 and end of the range, along with the length of the arrays in which the
 nonzero entries of these columns are to be returned, must be specified. 
cmatspace is zero, the negative of the value of
 surplus_p returned indicates the length needed for the arrays
 cmatind and cmatval.Example
 status = CPXgetcols (env, lp, &nzcnt, cmatbeg, cmatind,
                      cmatval, cmatspace, &surplus, 0,
                      cur_numcols-1);
 | env | A pointer to the CPLEX environment as returned by   | 
| lp | A pointer to a CPLEX problem object as returned by   | 
| nzcnt_p | A pointer to an integer to contain the number of nonzeros returned; that is, the true length of the arrays   | 
| cmatbeg | An array to contain indices indicating where each of the requested columns begins in the arrays   | 
| cmatind | An array to contain the row indices associated with the elements of   | 
| cmatval | An array to contain the nonzero coefficients of the specified columns. May be NULL if   | 
| cmatspace | An integer indicating the length of the arrays   | 
| surplus_p | A pointer to an integer to contain the difference between   | 
| begin | An integer indicating the beginning of the range of columns to be returned.  | 
| end | An integer indicating the end of the range of columns to be returned.  | 
The routine returns zero if successful and nonzero 
 if an error occurs. The value CPXERR_NEGATIVE_SURPLUS 
 indicates that insufficient space was available in the arrays 
 cmatind and cmatval to hold the 
 nonzero coefficients.