摘要:
这里参看memcpy的用法,将一个一维整型数组不停的叠加为二维数组 使用宏定义来控制二维数组的行列 代码如下: #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_RANK 15 #define MAX_COL 阅读全文
摘要:
一维转二维代码示例: #include <stdio.h> #include <stdlib.h> #define ROW 3 #define COL 2 int main(int argc, char *argv[]) { int arr1D[] = {1,2,3,4,5,6}; int arr2 阅读全文