View Single Post
Old Jun 2nd, 2008, 4:37 PM   #7
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
Re: When will i ever use pointers?

Quote:
Originally Posted by Ancient Dragon View Post
you can NOT write a C or C++ program of any significance without using pointers. And there are thousands of reasons why you might want to use them.
I don't really agree with this.

My first programming language was Fortran 77, and some of the most significant applications I ever wrote were in that language. Fortran 77 does not support any notion equivalent to pointers.

In C, pointers make some substantial things much easier than other techniques, hence the many thousands of reasons you might want to use them.

That is also true in C++ but, thanks to the standard library, it is quite possible to write substantial programs without knowing anything about pointers (the standard library often uses pointers behind the scenes, but that's implementation detail), and without running into the various mistakes that are possible with pointers. Of course, the trade-off is that it also takes time and effort to learn how to use the standard library effectively.
grumpy is offline   Reply With Quote