Uhhh I got a question..... I never really got the idea of pointers, could some one tell me the real purpose? to save space? ahhhhhhhh.... I mean I know the code and all but I need to know the true concept of it.....
A way to find answers, is to ask questions, for a question that has been asked may seem stupid for 5 minutes, but a question never asked will remain unknown forever.
pointers make life harder for programmers.
pointers represent indirection, meaning you have a variable storing the memory address of the actual variable, the name says it: they're not the variables themselves, they point to the variable.
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Right, but what is the advantage of knowing and pointing to a variable? Who cares whats the location of the variable? its all FFA84kdhd yada yada yada, what is it good for?
A way to find answers, is to ask questions, for a question that has been asked may seem stupid for 5 minutes, but a question never asked will remain unknown forever.
nobody actually cares about the addresses, thats why its so bloody stupid and makes life a pain for programmers. In other languages all variables are indirectly referenced anyway, so the actual advantage in C/C++ is that variables don't have to be indirectly referenced, which saves you loads of performance, but when doing anything else pointers are just lowlevel pain.
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Last edited by sunburnt; Feb 11th, 2003 at 08:14 PM.
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.