我將其發布為問題/答案,因為這花了我一段時間才能解決,并且我不介意我的解決方案有任何反饋。在Go / CGo中,如何處理作為指針傳遞的C數組?例如,使用此C結構:struct _GNetSnmpVarBind { guint32 *oid; /* name of the variable */ gsize oid_len; /* length of the name */ ... and other fields}; 我想將oid字段轉換為Go字符串,如何使用guint32 *指針?
- 3 回答
- 0 關注
- 369 瀏覽
添加回答
舉報
0/150
提交
取消