简体   繁体   中英

fill 2D array using pointers

Hello every one I want to ask how to fill 2D array using pointer. I know how to fill 1D array like

*(i+array) = 0;

but if i have array like this

int array[5][10] ;
int * rowptr ;
int * colptr ;

how should I initialize my 2D array using pointers

thanks

*(*(array+i)+j) = value;
\n

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM