We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
python 与 C++的string,需要调用string.c_str()函数转成char*型,然后再用python 与 C char*的转换
string.c_str()
char*
python 与 C char*的转换:
mport ctypes #ctypes的应用 libc = ctypes.cdll.LoadLibrary(your_so) func = libc.your_func func.restype = ctypes.c_char_p # 指定c函数返回类型,默认是整形 ret = func(...) # 此处ret便是python str或者None(c函数返回null的时候)
There was an error while loading. Please reload this page.
[[TOC]]