标签:class blog code color com os
1. 二维数组转置
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 |
void
matrix_transpose(int
*src[], int
*dst[], int
x, int
y){ int
i, j; int
*psrc, *pdst; i = j = 0; psrc = (int
*)src; pdst = (int
*)dst; for(i = 0; i < x; i++) { for(j = 0; j < y; j++) { *(pdst + j*x + i) = *(psrc + i*y + j); } }} |
标签:class blog code color com os
原文地址:http://www.cnblogs.com/chagmf/p/3772431.html