how to convert mxChar to char?

5 次查看(过去 30 天)
Erald Schipper
Erald Schipper 2014-1-15
编辑: Friedrich 2014-1-15
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?

回答(1 个)

Friedrich
Friedrich 2014-1-15
编辑:Friedrich 2014-1-15
Have you tried using mxGetString instead of mxGetChars?
int mxGetString(const mxArray *pm, char *str, mwSize strlen);

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by