answersLogoWhite

0

The double star (**) notation is not specific to initializing a variable in a class. It is simply a double indirect reference to an object.

float myFloat; // an object
float *myFloatPtr; // a pointer to an object
float **myFloatPtrPtr; // a pointer to a pointer to an object

myFloat = 123.456; // initialize an object
myFloatPtr = &myFloat; // initialize a pointer to an object
myFloatPtrPtr = myFloatPtr; // initialize a pointer to a pointer to an object

myFloat; // refer to an object

*myFloatPtr; // refer to an object through a pointer

**myFloatPtrPtr; // refer to an object through a pointer to a pointer

*myFloatPtrPtr; // refer to the value of the pointer to the object

Double pointer notation is used where the caller intends that one of its own pointers need to be modified by a function call, so the address of the pointer, instead of the address of the object, is passed to the function.

An example might be the use of a linked list. The caller maintains a pointer to the first node. The caller invokes functions to search, add, and remove. If those operations involve adding or deleting the first node, then the caller's pointer has to change, not the .next pointer in any of the nodes, and you need the address of the pointer to do that.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the spectral class of Sirius?

Sirius is classified as an A-type main sequence star. It is specifically categorized as an A1V star, with a surface temperature of about 9,940 K.


How do you describe a variable star?

A variable star is a star whose brightness as seen from Earth that fluctuates.


What color is the star Castor?

Castor is a variable star and also a quadruple star system, and has a spectral class of A1/A2 giving it a colour of white to white blue. See link for more information


Is V 469 a valid variable star designation?

Yes, The first 334 variable stars in a constellation have single or double letters then they are numbered V335 upwards. For the question to make sense related to a particular star the constellation needs to be included as well.


How do you describe variable stars?

A variable star is a star whose brightness as seen from Earth that fluctuates.


When was American Association of Variable Star Observers created?

American Association of Variable Star Observers was created in 1911.


What is the period of the variable star betelgeuse?

Betelgeuse is a semi-regular variable star, meaning it does not have a consistent period like a regular variable star. Its brightness fluctuates irregularly over periods of months to years.


What type of star is El Nath?

Elnath is a B class giant, There is a faint star nearby (BD+28 795B) which may be a companion making Elnath part of a double star.


What is the spectral class for sirius?

Sirius is a double star. The brighter component ... the one you actually notice in the night sky ... is spectral class A1V. The faint 'secondary' component is spectral class DA2.


Is stars shining an example of s continuous variable?

No, it is a continuous process but not a continuous variable. The magnitude of star-shine, across all stars is a continuous variable. The magnitude of a star's shine over time is a continuous variable.


What star class does the sun belong in?

The sun belongs to the star class G-type main-sequence star, also known as a G dwarf star.


A star whose brightness changes?

A star who's brightness changes is called a variable star.Examples are:AlgolPolarisBetelgeuse.See related link for more information.