Implementing array of array 
Author Message
 Implementing array of array

I am trying to implement a class that derives from
System.Web.Hosting.SimpleWorkerRequest.  One of the abstract methods I need
to overide is:
    public virtual string[][] GetUnknownRequestHeaders();

I am having a tough time declaring and constructing the return value in the
function implementation.  For example, when I try:
    String* result [][];
    result = new String* [n][] ;

I get this error on both lines:
    C2691: 'System::String __gc * __gc[]' : invalid type for __gc array
element



Thu, 07 Jul 2005 01:34:57 GMT  
 Implementing array of array
Managed C++ does not support jagged arrays (arrays of arrays).  You'll need
to use some other language like C# or VB.NET to implement that piece.

-Sean


Quote:
> I am trying to implement a class that derives from
> System.Web.Hosting.SimpleWorkerRequest.  One of the abstract methods I
need
> to overide is:
>     public virtual string[][] GetUnknownRequestHeaders();

> I am having a tough time declaring and constructing the return value in
the
> function implementation.  For example, when I try:
>     String* result [][];
>     result = new String* [n][] ;

> I get this error on both lines:
>     C2691: 'System::String __gc * __gc[]' : invalid type for __gc array
> element



Thu, 07 Jul 2005 03:54:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. char array (array of array...) question

2. implementing an array of strings

3. k-ary tree implemented in array

4. corretion to: k-ary tree implemented in an array

5. Different ways of implementing a 2d array

6. Implementing a binary tree in an array....

7. How to implement hash arrays in Unix C ?

8. How to implement an array of RGB colors

9. Cannot implement an array serialization

10. How to implement a bit array?

11. How to implement a bit array?

12. Implementing arrays

 

 
Powered by phpBB® Forum Software