J
Jonathan DeCarlo
I have a situation where I need to override a method in
managed C++ that was originally defined in C#. The
method takes a parameter of an array of arrays of
doubles. Here is a simple examples that shows what I'm
talking about:
///////////////////////////////////////////
// C# Base Class
public class A
{
public abstract void func(double[][] x);
}
// MC++ Derived Class
public __gc class B : public A
{
public:
virtual void func(double x __gc[] __gc[]);
};
////////////////////////////////////////////
The problem is that I get errors when I compile my C++
class even though this is how intellesense tells me the
prototype of the function should look. The only thing
that has gotten me past the syntax errors is to define
the function as follows:
virtual void func(Array* x __gc[]);
However, since the base class method is abstract, I'm
getting an error message that says that my C++ class is
abstract as well because I didn't override func.
My question is, what is the correct syntax for the
function that takes an array of arrays of doubles? In
other words, what's the equivalent of C#'s "double[][]"
type in MC++?
Thanks in advance for any help!
Sincerely,
Jonathan DeCarlo
managed C++ that was originally defined in C#. The
method takes a parameter of an array of arrays of
doubles. Here is a simple examples that shows what I'm
talking about:
///////////////////////////////////////////
// C# Base Class
public class A
{
public abstract void func(double[][] x);
}
// MC++ Derived Class
public __gc class B : public A
{
public:
virtual void func(double x __gc[] __gc[]);
};
////////////////////////////////////////////
The problem is that I get errors when I compile my C++
class even though this is how intellesense tells me the
prototype of the function should look. The only thing
that has gotten me past the syntax errors is to define
the function as follows:
virtual void func(Array* x __gc[]);
However, since the base class method is abstract, I'm
getting an error message that says that my C++ class is
abstract as well because I didn't override func.
My question is, what is the correct syntax for the
function that takes an array of arrays of doubles? In
other words, what's the equivalent of C#'s "double[][]"
type in MC++?
Thanks in advance for any help!
Sincerely,
Jonathan DeCarlo