Created
January 26, 2017 20:06
-
-
Save kanzash/cf019271d731e2b6b8919904f7d81f93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void freeArray(int **array, int rows, int cols) { | |
int i = 0; | |
int j = 0; | |
for (i=0; i<rows; i++) { | |
for(j=0; j<cols; j++){ | |
free (array[j]); | |
} | |
free(array[i]); | |
} | |
free(array); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment