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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -