Return one array value - take array name from variable

Hello, right now I am trying to do something like this.

int give_number(char row[], int column){

int N0[]={1,1,1,1,1,1,1};
int N1[]={1,1,1,1,1,1,1};
int N2[]={0,1,1,1,1,0,1};
int N3[]={0,1,1,1,0,1,1};
int N4[]={1,1,1,1,0,1,0};
int N5[]={1,1,0,1,0,1,1};
int N6[]={1,0,1,1,1,1,1};
int N7[]={1,1,1,1,1,0,1};
int N8[]={1,1,1,1,1,1,1};
int N9[]={1,1,1,1,0,1,1};

return row[column];

}

I expect a return for row[column];

for example

int test=give_number("N2",2);

should output

test=1

But it doesn´t work. The output is simply empty.

Variable "names" don't exist at run time. In fact, they don't really exist at all except in your code. The Compiler will turn all references to your variable "names" into storage places in Memory.

You could achieve something similar using multi-dimensional Arrays.

Why not use a two-dimension array?
There may be reasons, but in this case, i think it will solve your problem.

int  N [] [] = {....};

then, 

N [x][y] is your candidate.

That's not going to work as variable names mean nothing to the compiler. Why not something like:

void setup() {
  Serial.begin(9600);

  Serial.println(get_number(3, 2));
}

int get_number(int row, int column) {

  int N[][10] = { {1, 1, 1, 1, 1, 1, 1},
    {1, 1, 1, 1, 1, 1, 1},
    {0, 1, 1, 1, 1, 0, 1},
    {0, 2, 3, 4, 5, 6, 7},
    {1, 1, 1, 1, 0, 1, 0},
    {1, 1, 0, 1, 0, 1, 1},
    {1, 0, 1, 1, 1, 1, 1},
    {1, 1, 1, 1, 1, 0, 1},
    {1, 1, 1, 1, 1, 1, 1},
    {1, 1, 1, 1, 0, 1, 1}
  };

  return N[row][column];
}

void loop() {
 
}

But if you're going to do that, there's no reason for the function in the first place, unless it needs to be private and not in scope.

I took the 2D Array method and it worked nicely. thx