Data types

Describes the data types available in the C API.

In the Callable Library, CPLEX defines a few special data types for specific CPLEX objects, as you see in the table Table 1. The types starting with CPXC represent the corresponding pointers to constant (const) objects.
Table 1. Special data types in the Callable Library
Data type Is a pointer to Declaration Set by calling
CPXENVptr CPXCENVptr CPLEX environment CPXENVptr env; CPXopenCPLEX
CPXLPptr CPXCLPptr problem object CPXLPptr lp; CPXcreateprob
CPXNETptr CPXCNETptr problem object CPXNETptr net; CPXNETcreateprob
CPXCHANNELptr message channel CPXCHANNELptr channel;

CPXgetchannels

When any of these special variables are set to a value returned by an appropriate routine, that value can be passed directly to other CPLEX routines that require such arguments. The actual internal type of these variables is a memory address (that is, a pointer); this address uniquely identifies the corresponding object. If you are programming in a language other than C, you should choose an appropriate integer type or pointer type to hold the values of these variables.