Yes, you can do crazy shit if you try hard enough, but every reasonable programmer would access foo->child->b als foo->child->b and not via that crazy LISPy expression.
By question was: Why would you have a pointer to a memory address that itself only holds a pointer somewhere else?
So far the only reasonable explanation is from @Victoria@lemmy.blahaj.zone:
I’ve not developed anything in C/C++, so I don’t know practical uses for a double pointer, aside from multidimensional arrays, or arrays of pointers
My point was that, conceptually, pointers to pointers is how most complex data structures work. Even if the C representation of said code doesn’t have a int** somewhere
Yes, you can do crazy shit if you try hard enough, but every reasonable programmer would access
foo->child->b
alsfoo->child->b
and not via that crazy LISPy expression.By question was: Why would you have a pointer to a memory address that itself only holds a pointer somewhere else?
So far the only reasonable explanation is from @Victoria@lemmy.blahaj.zone:
I’m more talking about theory than practical.
I’ve not developed anything in C/C++, so I don’t know practical uses for a double pointer, aside from multidimensional arrays, or arrays of pointers
My point was that, conceptually, pointers to pointers is how most complex data structures work. Even if the C representation of said code doesn’t have a
int**
somewhere