just as the following code:
int a[100],b[10][10];
we declare two arrays,A 100 one dimensional and a 10*10 two dimensional.
My question is where is the size of b's line (10) store?
And,How could I use the type like c[][] to visit a element in a?
At present,I know two ways to do this,one is use define like
#define c[(x)][(y)] a[(x*10)+(y)]
the second is use memcpy to copy to a 2dimensional array.
Is there any other ways?
Thank you very much!
Aucun commentaire:
Enregistrer un commentaire