Thanks for all your help!
Type: Posts; User: kuda
Thanks for all your help!
I think that I've got it, or at least that I understand enough of it for now.
My conclusion:
Word * nw1 = *(Word * const *)w1;
w1 is cast as a const pointer, to a pointer to Word. It is then...
Thanks tabstop, that makes sense.
Here's my understanding so far:
Word *nw1 = *(Word * const *)w1;
nw1 is a pointer to what w1 points to. In other words, nw1, a pointer to Word, points...
Mats,
Thanks for the reply — bit clearer now! Bear with me here:
Doesn't w1 need to be a pointer to Word (as opposed to a pointer to pointer of Word)?
In terms of syntax, to cast w1 to a const...
Hi everyone,
I've managed to write a working program in response to Exercise 6.4 in K&R (2nd Ed, p. 143) ('Write a program that prints the distinct words in its input sorted into decreasing order...