|
-
Nov 3rd, 2003, 11:13 AM
#1
Thread Starter
Junior Member
An array of 2D arrays... how to create and reference??
I am trying to create an array of 2D arrays and dont have the slightest idea of how to start. Does anyone have any code that utilizes an array of 2D arrays. It would be a big help.
Thanks,
brazilnut
-
Nov 3rd, 2003, 12:05 PM
#2
uuh you just mean something like this?
dim arr(3,3) as integer ' 4x4 array
arr(0,3) =199999999999999999999999999999999999 'overflow
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Nov 3rd, 2003, 12:44 PM
#3
Thread Starter
Junior Member
I may be thinking about something Ive done in C++ before... I had an array of pointers. Each pointer pointed to a 2D array. Is this possible.... If not, here is my problem...
I need a dynamic number of 2D arrays at run time... this number could be 5 or 200.... I was thinking I could setup an array of 2D arrays and simply ReDim when I knew the exact size at execution.
thanks for the reply,
brazilnut
-
Nov 3rd, 2003, 12:51 PM
#4
yay gay
what mr polite said is correct
will create 10 arrays of an array of 10 integers
\m/  \m/
-
Nov 3rd, 2003, 12:52 PM
#5
hmm wouldnt an array of 2D arrays be just a 3D array?
you dont have pointers in VB.. you can use C# if youre looking for pointers 
when using Redim, yuo can use Redim Preserve to make sure the content of the array isnt deleted
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Nov 3rd, 2003, 12:57 PM
#6
Thread Starter
Junior Member
How would you go about creating a dynamic number of 2D arrays at run time... this number could be 5 or 200.
I am trying to avoid this:
Dim temp2DArray1 (,) As Double
Dim temp2DArray2 (,) As Double
Dim temp2DArray3 (,) As Double
Dim temp2DArray4 (,) As Double
Dim temp2DArray5 (,) As Double
Dim temp2DArray6 (,) As Double
etc.... could need up to 200 or more of these
-
Nov 3rd, 2003, 01:00 PM
#7
Originally posted by brazilnut52
How would you go about creating a dynamic number of 2D arrays at run time... this number could be 5 or 200.
I am trying to avoid this:
Dim temp2DArray1 (,) As Double
Dim temp2DArray2 (,) As Double
Dim temp2DArray3 (,) As Double
Dim temp2DArray4 (,) As Double
Dim temp2DArray5 (,) As Double
Dim temp2DArray6 (,) As Double
etc.... could need up to 200 or more of these
well make it 3d
dim myArr( ,,) as double
redim preserve myArr(someNewSize)
I think redim has some limitations when it comes to arrays other than 1D. maybe you can only resize the first dimension? in this case you would have to have the dimensions of your 2D arrays fixed. Resizing the first dimension would change the number of 2D arrays in your 3D array, if that makes sense
but I dont know a good way to do this, maybe you should wait and see if anyone comes with a better answer
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|