Is it possible to convert a single dimensional array into a two dimensional array?
i first tought that will be very easy, just set the pointer of the 2D array to the beginning of the 1D array like this:
int foo[] = {1,2,3,4,5,6};
int bla[2][3] = foo;
because i can easily create an two dimensional array like this:
int bla[2][3] = {1,2,3,4,5,6};
so the question is now, is there a way to convert it via the pointer?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…