int QSget_x_array (QSprob p, double *x)
/* p is an initialized QSprob, a handle to an existing LP problem  */

int rval, ncols;
double *x;

ncols = QSget_colcount (p);
x = (double *) malloc (ncols * sizeof (double));

rval = QSget_x_array (p, x);
if (rval) {
    fprintf (stderr, "Could not get x-vector, error code %d\n", rval);
} else {
    /* To print solution with names, see QSget_solution() example. */
}

free (x);