我试过了:
int** thread_args = malloc(24);
Run Code Online (Sandbox Code Playgroud)
和
int** thread_args = malloc(sizeof(int*) * 3);
Run Code Online (Sandbox Code Playgroud)
但我不断收到错误消息。
我将衷心感谢您的帮助!
如果你使用 C++ 编译器,你可能需要转换 malloc 的结果:
int ** th_args = (int**)malloc(24)
或者干脆使用 operator new。
如果你使用C编译器,那么......我不确定为什么会抛出这个错误