Not as bad as I suspected, at least at the beginner level. Pointers only point to memory address of variables, etc. If the variable changes after the pointer is set to it, then the pointer, being a reference to a variable, will reflect the new variable. However, this is pretty neat considering that since a pointer points to a slice of memory, it can check to see if something has changed in this memory address. If so, it acts accordingly.
If a pointer is being used to get a value of a variable, it can do so and from there another variable can grab that value for storage. That variable, not being a pointer, will hold the value. However, the pointer can change due to changes in the memory address. The & has to be used for the pointer to reference a value or variable. This is like the scanif which was learned in earlier chapters.
As it is Saturday, I have a very busy day. I do not think I will get past an hour of work today. I hope to do a lot more tomorrow.
No comments:
Post a Comment