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?

回答 (1 件)

Friedrich
Friedrich 2014 年 1 月 15 日
編集済み: Friedrich 2014 年 1 月 15 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeData Type Conversion についてさらに検索

製品

タグ

質問済み:

2014 年 1 月 15 日

編集済み:

2014 年 1 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by