array arg

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
 
I

Ioannis Vranos

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top