Latest

Archive

Community news

C++

Communities and Content

Databases

Editorials

Emacs

General

HTML

Java

Notices

PHP

XML

Apache

C++

Database

General

HTML

Java

Javascript

Linux

Object oriented programming

Open source

Perl

PHP

Python

Ruby

SOAP

XML

Suggest a link

Advertise on zez

Contribute

Contact us

About zez


RE: Pointer question


Categories C++ Code

Topic:

RE: Pointer question

Author:

Ole Kristian Brattli

Time:

01.12.2000 17:39

Text:

>
> > and what does it mean when you use 2 "*"
> > like:
> > **ptr ?
>
> This means a pointer to a pointer to a (whatever object ptr is). It is used some times when dealing with multidimensional arrays, among others.
> regards, Gunnstein
C-point of view:
When passing a pointer to a procedure as a parameter, it is passed as a copy. Pointers solve the problem of not being able to manipulate the actual object this pointer reffers to. Now imagine that you want to change the value of the pointer it self... Jupp, a copy of your pointer arrives, is changed by your procedure, and is never returned. To solve this tricky litle piece of nightmare we announce: **pointers. A pointer to a pointer. the copy of the **pointer that is available in the procedure holds the address of the "object" you want to manipulate: the *pointer. Allowing you to perform what ever changes you want to do to your *pointer

That really all the magic there is to it.

BR
-Ole



Message threads

Topic: Author:
Time:
Pointer question Geir Haugom 10.11.2000 10:32  
  RE: Pointer question Gunnstein Lye 10.11.2000 10:32  
   RE: Pointer question Ole Kristian Brattli 01.12.2000 17:39  


Forgot your password?

Register a new user

Results

Polls