fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. #define x 2
  5. float src_row_0[x] = { 0.0f, 0.1f };
  6. float src_row_1[x] = { 1.0f, 1.1f };
  7. float * src_rows[x] = { src_row_0, src_row_1 };
  8. float ** src = src_rows;
  9.  
  10. float dst[x][x];
  11.  
  12. int main(void) {
  13. for(int i=0; i<x; ++i) {
  14. memcpy(&dst[i], src[i], x * sizeof(float));
  15. }
  16. for(int i=0; i<x; ++i) {
  17. for(int j=0; j<x; ++j) {
  18. printf("\t%f", dst[i][j]);
  19. }
  20. puts("");
  21. }
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout
	0.000000	0.100000
	1.000000	1.100000