Hi,
I have a function that creates an array and want to use that array in the client.
but what is the syntax in C++.NET 2005 to specify an array as output param of a function ??
ref class Test
{
void OutputParam(array<int>^ intArr)
{
intArr = gcnew array<int>(3);
for(int i=0; i<intArr->Length; i++)
intArr[i] = i*2;
}
};
Client :
r = gcnew Test();
array<int>^ intArr1 = nullptr;
r->OutputParam(intArr1);
for(int i=0; i<intArr1->Length; i++) --> CRASH
Console::Write(" {0}",intArr1[i]);
I tried
void OutputParam(array<int>^ intArr)
void OutputParam(array<int>^^ intArr)
but nothing works...
thanks
Chris
James Park - 30 Jun 2005 17:05 GMT
void OutputParam(array<int>^% intArr)
> Hi,
>
[quoted text clipped - 34 lines]
> Comprehensive, categorised, searchable collection of links to ASP &
> ASP.NET resources...