View Single Post
Old Sep 20th, 2005, 2:41 AM   #19
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6 bl00dninja is on a distinguished road
does the text get super-in-depth right away with them? a lot of books will say "hey, this what a pointer is!!!" with pictures of cubby-holes representing memory and all that shit. then they're like, "see you in six chapters! (when they actually explain why the hell you would ever want to use one".

sometimes it's nice just to be presented with the basics of an idea and let your brain soak in it for awhile, and then come back and get a little more in-depth. the concept of a pointer isn't that difficult, it's usually the implementation of them (in useful and non-redundant ways).

int x = 1;
int * px = &x;
cout<<*px<<endl;

is stupid.

(this may be a crappy example but...)

remote controllers are great. imagine if every time you wanted to change the channel you had to lug your fat ass off the couch and go get a new tv that was on the right channel...that would be gay. but now you have a remote and can access all that stuff from a distance. it's a way to "point" to various elements of your program and get them to do things.

that's just one shitty example, but there are countless applications for which pointers are the best way to go.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote