(no title)
anon946 | 1 year ago
// Examples of dereference operator.
int i, *ip = ..., **ipp = ...;
i = *ip; // Assuming ip has been correctly initialized.
i = **ipp; // Likewise.
// The address-of operator is the opposite.
ip = &i;
ipp = &&i;
I actually talk through the last line. Almost no one ever questions it. I then ask students to look at that last line again, and ask them if an address has an address, and if so, what does that mean, could it ever be useful?
mewpmewp2|1 year ago
coupdejarnac|1 year ago