C++ int vector to c#
Posted
by
Stefan Koenen
on Stack Overflow
See other posts from Stack Overflow
or by Stefan Koenen
Published on 2012-06-20T21:07:44Z
Indexed on
2012/06/20
21:16 UTC
Read the original article
Hit count: 151
I'm doing a C# project and I want to call next_permutation
from the algorithm library in C++. I found the way to call c++ functions in c# but i dont know how to get vectors from c++ and use it in c# (cause next_permutation require a int vector...)
this is what I'm trying at the moment:
extern void NextPermutation(vector<int>& permutation)
{
next_permutation (permutation.begin(),permutation.end());
}
[DllImport("PEDLL.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void NextPermutation(IntPtr test);
© Stack Overflow or respective owner