R
Ravi Singh (UCSD)
Hello all
I am trying to use jagged and multi-dimensional arrays in C++.
In C# these work fine
// for jagged arrays
string [][] jaggedArray = new string [3][];
//for multidimensional arrays
string [,] multidimensionalArray = new string[3,3]
In C++
//for jagged arrays
String* jaggedArray[][] = new String*[3][];
error C2691: 'System::String __gc * __gc[]' : invalid type for __gc
array element
//for multidimensional arrays
String*[,] multidimensionalArray = new String*[3,3];
I am not sure whats going on.
Thanks,
-Ravi Singh.
I am trying to use jagged and multi-dimensional arrays in C++.
In C# these work fine
// for jagged arrays
string [][] jaggedArray = new string [3][];
//for multidimensional arrays
string [,] multidimensionalArray = new string[3,3]
In C++
//for jagged arrays
String* jaggedArray[][] = new String*[3][];
error C2691: 'System::String __gc * __gc[]' : invalid type for __gc
array element
//for multidimensional arrays
String*[,] multidimensionalArray = new String*[3,3];
I am not sure whats going on.
Thanks,
-Ravi Singh.