how to convert mxChar to char?

I am creating a MEX file for a connection with C++ on another computer. For that I need a char with the IP, but I can only extract an mxChar from the input of the mexfunction with mxGetChars. So my question is how to convert mxChar to char, is there another way of using mxGetChars?

Respuestas (1)

Friedrich
Friedrich el 15 de En. de 2014
Editada: Friedrich el 15 de En. de 2014

0 votos

Have you tried using mxGetString instead of mxGetChars?
int mxGetString(const mxArray *pm, char *str, mwSize strlen);

Categorías

Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 15 de En. de 2014

Editada:

el 15 de En. de 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by