V
vijay.gandhi
Hello,
I am trying to write a wrapper function in C++/CLI over an existing
function in C++.
For instance, assume the C++ function is:
ComputeMedian(double* x).
To create a C++/CLI wrapper, I created a function in C++/CLI which
looks like:
ComputeMedianInterface(array<double>^ x).
I want my ComputeMedianInterface() function to call ComputeMedian()
internally. I somehow want to convert the input values array<double>^x
to double* x so that I do not have to modify the code within
ComputeMedian().
The only way I could think of is by creating a copy (using malloc so
that I get the pointer) within ComputeMedianInterface() and then
passing that as an argument to ComputeMedian().
Is there any better way?
Thanks!
Vijay.
I am trying to write a wrapper function in C++/CLI over an existing
function in C++.
For instance, assume the C++ function is:
ComputeMedian(double* x).
To create a C++/CLI wrapper, I created a function in C++/CLI which
looks like:
ComputeMedianInterface(array<double>^ x).
I want my ComputeMedianInterface() function to call ComputeMedian()
internally. I somehow want to convert the input values array<double>^x
to double* x so that I do not have to modify the code within
ComputeMedian().
The only way I could think of is by creating a copy (using malloc so
that I get the pointer) within ComputeMedianInterface() and then
passing that as an argument to ComputeMedian().
Is there any better way?
Thanks!
Vijay.