Hello,

can someone explain to me please what I am doing wrong by passing an integer to this function and then just creating a static array? The error I get is:

Error: variable N cannot be read at compile time

int[] foo(int N){


        int[N] v;
        //do something with it
        int[] s;
        return s;
}

void main(){

        int N = 12;
        int[] A;
        A=prim_numbers(N);

}

Reply via email to