方法编组中的int参数向量 [英] vector of int parameter in a method marshaling
本文介绍了方法编组中的int参数向量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这样的c ++函数:
void Reshape(const vector< ; int>& shape){
//一些代码
}
我已导出此函数,我需要从c#调用它,但我的问题是如何将正确的参数传递给此方法,因为它似乎没有等效的C ++ 矢量< INT>&NBSP;在c#
解决方案
您是否正在尝试将C#int []数组中包含的数据传递给C ++函数?
一种方法是在C ++端使用SAFEARRAY。
I have a c++ function like that:
void Reshape(const vector<int>& shape){ // some code }
i have export this function and i need to call it from c# but my problem is how to pass the right argument to this method since it seems that there is no equivalent to C++ vector<int> in c#
解决方案
Are you trying to pass data contained in a C# int[] array to the C++ function?
One way would be to use a SAFEARRAY on the C++ side.
这篇关于方法编组中的int参数向量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文