From -6617751489879104499
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,be4e234b6733532
X-Google-Attributes: gidf78e5,public
From: walth@netcom.com (Walt Howard)
Subject: Re: why are pointers necessary?
Date: 1997/07/24
Message-ID: <33ddabe7.4991118@news.deltanet.com>#1/1
X-Deja-AN: 258612614
References: <captarm-2007971209450001@169.197.21.243> <rf5iuy2m9p1.fsf@vx.cit.alcatel.fr>
X-Original-Date: Thu, 24 Jul 1997 19:26:27 GMT
Organization: Delta Internet Services, Inc.
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBM9f9OEy4NqrwXLNJAQHvmQH+KM0DkOwqC8foYI0aBs9BTjEfK4AkCx0D 8wDfwzdXlgARsv9oxWhWBmVBmHcQvCoJoJABHoCDpuOkJPFsTBRZuw== =kQfu
Reply-To: walth@netcom.com
Newsgroups: comp.std.c++
Originator: austern@isolde.mti.sgi.com


On 23 Jul 97 09:27:16 GMT, James Kanze
<james-albert.kanze@vx.cit.alcatel.fr> wrote:

>captarm@azstarnet.COM (Howard Salmon) writes:
>
> |>  I'm teaching myself C++ and I'm struggling with understanding why creating
> |>  pointers are necessary.  It's possible to create programs without
> |>  pointers...so what's the advantage of pointers?  The best I could come up
> |>  with was that data is "two-dimensional", i.e., there's the data itself,
> |>  and then the location of the data.  Each of these things needs to be
> |>  stored in separate places in memory.  Does the OS move the location of
> |>  data around, hence the need for pointers?  Or do we ever have a need for
> |>  moving the data location around?  I feel like I'm just on the verge of
> |>  understanding why we NEED pointers.
>
>Get a book about algorithms, and look up linked lists, trees, graphs,
>etc.

	Here's a good analogy. The world wide web. An URL is a
pointer. The actual web page is the real data. Do you save
locally, every web page you access? Or do you just save its URL?
Think about the reasons URLs are good. Pointers have just about
all the same good reasons.

	Walt Howard
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



