Get the size of managed array

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
I've a function witch have a managed array as input and output parameters.
output array has the same size as input array
I'de like to declare an array witch has the same size like the input array :

array<int,2>^ fct(array<int,2>^ T)
{
array<int,2>^ t=gcnew array<int,2>( ?,?);
...
return t;
}

someone has an idea?
Thanks
 
I've a function witch have a managed array as input and output parameters.
output array has the same size as input array
I'de like to declare an array witch has the same size like the input array
:

array<int,2>^ fct(array<int,2>^ T)
{
array<int,2>^ t=gcnew array<int,2>( ?,?);
...
return t;
}

someone has an idea?


try:
array<int,2>^ t=gcnew array<int,2>(T->GetLength(0), T->GetLength(1));
 

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

Back
Top