Arrays

  • Thread starter Thread starter kelvin.koogan
  • Start date Start date
K

kelvin.koogan

In VS2005 I want to declare function that returns an array, e.g.

array<Byte> ^GetData();

However the function is defined in an interface which has to compile
in VS2003 which doesn't support array.

How can I define a function which returns a pointer to an array so it
compiles in VS2000 but has the prototype given above in VS2005.

TIA,
KK
 
In VS2005 I want to declare function that returns an array, e.g.

array<Byte> ^GetData();

However the function is defined in an interface which has to compile
in VS2003 which doesn't support array.

How can I define a function which returns a pointer to an array so it
compiles in VS2000 but has the prototype given above in VS2005.

TIA,
KK

I think you're going to have issues with this, as VS 2003 does not support
C++/CLI. VS 2005 was the first to support C++/CLI. VS 2003 supported C++
"with managed extensions", IIRC.

Your best bet may be to look into doing what you need to do in native C++
and wrapping your function for use in the managed environments.
 
In VS2005 I want to declare function that returns an array, e.g.

array<Byte> ^GetData();

However the function is defined in an interface which has to compile
in VS2003 which doesn't support array.

How can I define a function which returns a pointer to an array so it
compiles in VS2000 but has the prototype given above in VS2005.

KK:

Did you try

Byte __gc[] GetData();

?
 
Back
Top