Declaring a pointer to a temporary buffer on the stack in a single line?

Solution for Declaring a pointer to a temporary buffer on the stack in a single line?
is Given Below:

In the following code, getDriverNames() is declared as getDriverNames(char **names, long maxDrivers), where the names is required to be an array of 32-character string buffers to receive available driver names (I only care about the first available driver).

Is there a way to declare the names variable without the intermediate buffer?

char buffer[32+1] = {};
char *names[1] = {buffer};
asioDrivers->getDriverNames(names, 1);
return asioDrivers->loadDriver(names[0]);

The getDriverNames() function expects a pointer to an array of pointers to arrays. It is going to follow the pointers. So no, there is no way to declare all of that inline, you need the individual arrays to be allocated before you can take their addresses.

         names    buffer
         -----    --------------------
param -> | 0 | -> | 0 | 1 | ... | 32 |
         -----    --------------------