what does ** mean in C
What does it mean when a object has 2 asterisks at the beginning?
**variable
Answers:
It is pointer to pointer. For more details you can check : Pointer to pointer
EDIT It can be good for example for dynamically allocating multidimensional arrays :
Like :
#include <stdlib.h>
int **array;
array = malloc(nrows * sizeof(int *));
if(array == NULL)
{
fprintf(stderr, "out of memory\n");
exit or return
}
for(i = 0; i < nrows; i++)
{
array[i] = malloc(ncolumns * sizeof(int));
if(array[i] == NULL)
{
fprintf(stderr, "out of memory\n");
exit or return
}
}