Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void populate ( int out_array[ ][15] , int *in_r , int *in_c )
- {
- int *row;
- int *col;
- row = (int*)malloc(4);
- if(row == NULL)
- {
- printf("Not enough memory available\n");
- }
- col = (int*)malloc(4);
- if(col == NULL)
- {
- printf("Not enough memory available\n");
- }
- *row = 0;
- *col = 0;
- FILE *data;
- data = fopen( "/home/f/csci/urbanc/ghp18.dat" , "r" );
- for(*row = 0; *row < *in_r ; *row++)
- {
- for(*col = 0 ; *col < *in_c ; *col++)
- {
- fscanf(data, "%d", &out_array[*row][*col]);
- }
- }
- fclose(data);
- return ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement