![]() |
| | #1 |
| Registered User Join Date: Sep 2008
Posts: 62
| jagged arrays with multidimensional array here is a jagged array with a two dimensional array: int [][,] jagged = new int [3][,]; // so there are three rows |---------| // row 0; |---------| |---------| // row 1; |---------| |---------| // row 2; |---------| // When we assign jagged [0] a reference to a 4 x 2 array. jagged [0] = int new [4,2]; // Does it mean that we assign four columns to the row 0? |---------| |---------| |---------| |---------| |---------| |---------| |---------| |---------| // and within each row, there are two more rows? |--0----1---| |--0----1---| |--0----1---| |--0----1---| |------0----| |-------1----| |-----2-----| |------3-----| // So when we assign value to jagged [0][1,0] = 10; // Does it mean that we access to the second column, which is 1 of the row 0 and // assign the value 10 to the second row of 1, which is above the column named 1 // 0 and 1, and we assign the 10 to 1, not 0? |
| kenryuakuma is offline | |
| | #2 |
| Registered User Join Date: Jun 2008
Posts: 1,134
| Code: int [][,] jagged = new int [3][,];| Code: jagged [0] = int new [4,2]; jagged[0] = * * * * * * * * If you do Code: jagged [1] = int new [3,3]; * * * * * * * * * |
| C_ntua is offline | |
| | #3 |
| Registered User Join Date: Nov 2009
Posts: 1
| I thing that: here is a jagged array with a two dimensional array: int [][,] jagged = new int [3][,]; _______________ medical SEO | doctor website | medical practice marketing |
| doctorweb is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| allocation and reallocation of memory dynamically of an integer array | zamir | C++ Programming | 16 | 05-29-2009 07:25 PM |
| Returning a multidimensional array from pointer function in Visual C++ | yalcin | C++ Programming | 0 | 05-29-2009 05:48 AM |
| Class Template Trouble | pliang | C++ Programming | 4 | 04-21-2005 04:15 AM |
| Multidimensional Array in a Structure | Night_Blade | C Programming | 3 | 04-04-2005 08:14 PM |
| Type and nontype parameters w/overloading | Mr_LJ | C++ Programming | 3 | 01-02-2004 01:01 AM |