how to convert mxChar to char?

17 vues (au cours des 30 derniers jours)
Erald Schipper
Erald Schipper le 15 Jan 2014
Modifié(e) : Friedrich le 15 Jan 2014
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?

Réponses (1)

Friedrich
Friedrich le 15 Jan 2014
Modifié(e) : Friedrich le 15 Jan 2014
Have you tried using mxGetString instead of mxGetChars?
int mxGetString(const mxArray *pm, char *str, mwSize strlen);

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by