2008-10-04から1日間の記事一覧

2次元配列の動的確保 (C)

C

以前C++について書きましたが今回はCで。 #include <stdio.h> #include <stdlib.h> int main(void){ int row = 4; int col = 7; int** arr; int i, j; // 領域の確保 arr = (int**)calloc(row, sizeof(int)); for (i=0; i</stdlib.h></stdio.h>