473,385 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Array of Array (__gc)

Hello I've got some managed C++ and I would like to do something like this:
Int16 data1 __gc[] = {1, 2, 3, 4, 5};
Int16 data2 __gc[] = {2,3,4,5,6};

Int16 bigArr __gc[];

bigArr->Add(data1);
bigArr->Add(data2);
....
bigArr->Add(dataN);

System::Collections:IEnumerator * pMyEnum = bigArr->GetEnumerator();

while (pMyEnum->MoveNext()
{
Int16 data __gc[] = pMyEnum->Current; // I want to extract the
Add()ed arrays and stick them in a variable

}

Of course this doesn't compile, but I haven't figure out the correct syntax
to make this work. The return type of Current is an Object. How do I
cast this to the original type. Is this "unboxing"? I use VS 2003 and I
can deal with boxing and unboxing of ints and primitive types (even though I
REALLY don't understand the syntax yet)
Mar 19 '07 #1
0 956

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Stormkid | last post by:
Hi Group I'm trying to figure out a way that I can take two (two dimensional) arrays and avShed and shed, and subtract the matching elements in shed from avShed I've pasted the arrays blow from a...
3
by: Nicolas Fleury | last post by:
Hi, Does anyone know if arrays would be picklable in python 2.4? Until then, I tried to derive from array.array and add __setstate__ and __getstate__ with the following code, but it seems I'm not...
2
by: Gus Tabares | last post by:
Hello all, I'm trying to subclass array.array but having problems with a default parameter in the init constructor. Example: import array class TestClass(array.array): def __init__(self,...
0
by: Chris Lambacher | last post by:
Hi, I have to do some data manipulation that needs to be fast. I had a generator approach (that was faster than a list approch) which was taking approximately 5 seconds to run both encode and...
2
by: John Machin | last post by:
Googling for "pickle array" in comp.lang.python yields old messages that show a PickleError -- plus one message where Alex Martelli writes "I am but an egg" :O) Looks like arrays are NOW (2.4.1)...
1
by: Jonathan DeCarlo | last post by:
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...
3
by: 0to60 | last post by:
I can declare and initialize a managed array of managed types like this: System::Object* array __gc = {...} Now, what do I do if I wanna reset that array to something else without...
4
by: TJH | last post by:
hi there im new to develop in .net, and i keep getting this compiler error "cannot perform pointer arithmetic on __gc pointer" when i try: some_object->array = something; Thanks :) Toke Jansen
0
by: craig.conboy | last post by:
Using MC++ .Net 2.0, with the CLR Profiler (from Microsoft) I am seeing that 3 blocks of memory, each ~48MB in size, being allocated by some code that initializes a managed array. It is a jagged...
1
by: Fabio | last post by:
Hi All, I have a question concerning the use of array.array inside of C++ code I wrote. I am working with _big_ data files but some entries in these files are usually bounded say between -5 to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.