Jagged Arrays and ParamArray

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

Guest

I need to do a variable argument list in Managed C++, where each argument is
a double array. I believe that this is impossible, because to do so I would
need to make a jagged matrix of doubles, which is not supported. Does anyone
know if this is impossible, or if there is some other way to do this?

Using System.Array rather than double __gc [] is not an option for me.

Thanks
-- Chris
 
Chris said:
I need to do a variable argument list in Managed C++, where each argument
is a double array. I believe that this is impossible, because to do so I
would need to make a jagged matrix of doubles, which is not supported.
Does anyone know if this is impossible, or if there is some other way to
do this?

The old C++ syntax does not support jagged arrays. The new C++ syntax in
Whidbey does support this. Here's an example:

array<array<double>^>^ jagged_array;

In the old syntax, we support authoring functions that take param arrays by
simply letting you apply the attribute. The new syntax provides a formal
syntax for this concept, and it will also create parameter arrays
automatically on function calls.
 
Back
Top