This example uses the ILOG CPLEX Callable Library query routine CPXgetcolname()
to get the column names from a problem object. To do so, it applies the programming pattern we just described in Using Surplus Arguments for Array Allocations. It derives from the example lpex2.c
, explained in the manual ILOG CPLEX Getting Started manual. This query-routine example differs from that simpler example in several ways:
CPXgetcolname()
twice after optimization: the first call determines how much space to allocate to hold the names; the second call gets the names and stores them in the arrays cur_colname
and cur_colnamestore
.
cur_colname
. If no names exist there, the example creates fake names.
This example assumes that the current problem has been read from a file by CPXreadcopyprob()
. You can adapt the example to use other ILOG CPLEX query routines to get information about any problem read from a file.