s*******e 发帖数: 1269 | 1 if I define a dynamic matrix in a function, how can I define it as global
martix since I need to use it in other functions.
Thanks!
int **array1 = (int **)malloc(nrows * sizeof(int *));
how to do that? | y****i 发帖数: 156 | 2 1 Define a global variable
int **g_array;
2 let g_array = (int **)malloc(nrows * sizeof(int *));
3 Use it in other function
extern int **g_array;
【在 s*******e 的大作中提到】 : if I define a dynamic matrix in a function, how can I define it as global : martix since I need to use it in other functions. : Thanks! : int **array1 = (int **)malloc(nrows * sizeof(int *)); : how to do that?
|
|