array arg

  • Thread starter Thread starter Ian Lazarus
  • Start date Start date
I

Ian Lazarus

Hello,

In managed C++, if a function takes an array as an argument, it has to
specify whether that array is managed or not. If I want to handle both
managed and un-managed arrays, does that mean that there has to be two
functions? e.g.,

void foo(int x __gc[]);
void foo(int x __nogc[]);

Thanks
 
Ian said:
Hello,

In managed C++, if a function takes an array as an argument, it has to
specify whether that array is managed or not. If I want to handle both
managed and un-managed arrays, does that mean that there has to be two
functions? e.g.,

void foo(int x __gc[]);
void foo(int x __nogc[]);


This is the cleanest way.


The other is to write one for the unmanaged and pass a pin of the managed.
 
Back
Top