variables - what is this in C++? -
int* i; int * i; int **i;
i know
int *i;represent pointer variable
spacing doesn't make difference, first 2 identical.
int** i;
is pointer pointer int.
for example, if i
held pointer value, mean in memory starting @ address there pointer, time directly int
, , if followed address then you'd find actual int
number value.
int an_int = 3; int* p = &an_int; int** pp = &p;
this forms chain ala...
int** pp = &p ------> int* p = &an_int ------> int an_int = 3
Comments
Post a Comment