Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. double **mat = malloc(sizeof(double *) * row_cnt);
  2.     for (int i=0 ; i < row_cnt ; i++) {
  3.         mat[i] = malloc(sizeof(double) * col_cnt);
  4.     }
  5.  
  6.     for (int i=0 ; i < row_cnt ; i++) {
  7.         for (int j=0 ; j < col_cnt ; j++) {
  8.             if (!fscanf(inp_mat_file, "%lf", &mat[i][j])) {
  9.                 break;
  10.             }
  11.         }
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement