A
Alex Leduc
I'm trying to return an array's 2nd dimention as a single dimention array
private char[] array2d = new char[100, 5001];
public char[] ret(i) {
return;
}
I get a bunch of error for my return statement.
-Cannot implicitly convert ty 'char[*,*]' to char[]'
-Wrong number of indices inside [], expected '1'
I come from a C++ background. I don't want to have to use pointers but
surely there's a way to return a reference to the arrays' second dimention.
I'm begining to wonder if I should drop Arrays of chars entirely and
convert all the code to use string and StringBuilder (which suck IMO but
I digress).
Alexandre Leduc
private char[] array2d = new char[100, 5001];
public char[] ret(i) {
return;
}
I get a bunch of error for my return statement.
-Cannot implicitly convert ty 'char[*,*]' to char[]'
-Wrong number of indices inside [], expected '1'
I come from a C++ background. I don't want to have to use pointers but
surely there's a way to return a reference to the arrays' second dimention.
I'm begining to wonder if I should drop Arrays of chars entirely and
convert all the code to use string and StringBuilder (which suck IMO but
I digress).
Alexandre Leduc