B
bwaichu
In some APIs, we see char ** or void ** as a parameter. I never
distinguished between declaring a variable as char **x and passing x as
the parameter from declaring a variable char *x and passing &x. I also
consider the two the same. And since I debug everything I write, I
also saw know difference while debugging. I have also used them pass
data in and out of functions as well.
Now, I was pointed out today that there is a difference. I was even
pointed out this is addressed in the standards.
What I would like to know is what is the proper way to handle APIs that
have functions with void ** parameters.
One interesting item brought up is that I might end up overwriting a
previously declared variable.
Anyway, I hope to learn more.
Brian
distinguished between declaring a variable as char **x and passing x as
the parameter from declaring a variable char *x and passing &x. I also
consider the two the same. And since I debug everything I write, I
also saw know difference while debugging. I have also used them pass
data in and out of functions as well.
Now, I was pointed out today that there is a difference. I was even
pointed out this is addressed in the standards.
What I would like to know is what is the proper way to handle APIs that
have functions with void ** parameters.
One interesting item brought up is that I might end up overwriting a
previously declared variable.
Anyway, I hope to learn more.
Brian