The routine CPXchgcolname() changes the names of variables in a CPLEX problem object. If this routine is performed on a problem object with no variable names, default names are created before the change is made.

Return Value

The routine returns a zero on success, and a nonzero if an error occurs.


  int CPXchgcolname (CPXCENVptr env,
                     CPXLPptr lp,
                     int cnt,
                     const int *indices,
                     char **newname);


CPXCENVptr env

The pointer to the CPLEX environment as returned by CPXopenCPLEX().

CPXLPptr lp

A pointer to a CPLEX problem object as returned by CPXcreateprob().

int cnt

An integer that indicates the total number of variable names to be changed. Thus cnt specifies the length of the arrays indices and newname.

const int *indices

An array of length cnt containing the numerical indices of the variables for which the names are to be changed.

char **newname

An array of length cnt containing the strings of the new variable names for the columns specified in indices.

See Also


Previous Page: CPXchgcoeflist Return to Top Next Page: CPXchgctype