int main() {
char *bar = 0;
foo(&bar); // bar contains "Hello World" after this
free(bar);
return 0;
}
And indeed, it might get used for lists to pointers and such. An easy example is for example your arguments coming into main(); can be "char * argv[]" or "char ** argv"
Simply, it allows you to change (modify) the pointer that is passed to you. It's usually used when a function allocates some memory within itself and then it passes it back to you, instead of you allocating a buffer and passing it to the function.
Signature/Avatar nuking: none (can be changed in your profile)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum