我正在转换 C api > Java,并且我有以下函数原型。
/*
Retrieves an individual field value from the current Line
\param reader pointer to Text Reader object.
\param field_num relative field [aka column] index: first field has index 0.
\param type on completion this variable will contain the value type.
\param value on completion this variable will contain the current field value.
\return 0 on failure: any other value on success.
*/
extern int gaiaTextReaderFetchField (gaiaTextReaderPtr reader, int field_num, int *type, const char **value);
我想获得按预期返回的状态,将“type”作为int返回,将“value”作为字符串返回(不被释放)
从文档中我发现您创建了几个可以保留返回值的结构。
有人可以帮我做第一个吗?