what is double pointer in c++ code example
Example 1: double pointer malloc in c
char *x;
char **y;
x = (char*)malloc(sizeof(char) * 100);
y = (char**)malloc(sizeof(char*) * 100);
y = (char**)malloc(sizeof(char) * 50 * 50);
Example 2: double pointers C++
#include <stdio.h>
int main(void)
{
int value = 100;
int *value_ptr = &value;
int **value_double_ptr = &value_ptr;
printf("Value: %d\n", value);
printf("Pointer to value: %d\n", *value_ptr);
printf("Double pointer to value: %d\n", **value_double_ptr);
}