answersLogoWhite

0

A pointer is a programming tool that allows a value to be referenced. All data is allocated in memory and has a certain address attached to them. When you use a pointer, you are taking a value from an address called the reference. The original data is called the reference, and taking that value using a pointer is called dereferencing.

Example using Objective-C:

int anInt = 42; (anInt is stored in memory with the value of 42)

int *anIntPointer; (this is new datatype that wants to point to a certain address)

*anIntPointer = &anInt; (you are taking the pointer and dereferencing it to anInt. anytime you have a pointer [in this case denoted with an asterisk "*"], the reference will be noted with an ampersand "&")

Now there are also pointers to objects and structs that use an entirely different method, but same idea, the pointer grabs a referenced data value. This is especially valuable for referencing structures without having to reference every single member variable.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Is this sentence correct - forwarding this mail for your information?

It would be better to say, 'I am forwarding this mail, for your information.', or 'We are forwarding this mail for your information.'


What should I write when forwarding an email?

When forwarding an email, you should briefly explain why you are forwarding it and provide any necessary context for the recipient.


What are void pointers?

They are pointers without type


What is IP forwarding?

IP forwarding enables one workstation to sit on two LANs and to act as a gateway forwarding IP packets from one LAN to another. IP forwarding is also referred to as 'bridging' networks.


When was DHL Global Forwarding created?

DHL Global Forwarding was created in 1815.


Where the pointers are used?

POINTERS ARE USED TO STORE ADDRESS


What are the background pointers in java?

Java does not support pointers.


What is the code for call forwarding?

Call forwarding is a popular service that allows for calls to be forwarded to your phone. The code to set up call forwarding is usually *72.


How do you start a clearing and forwarding business?

how to find needed company for clearing & forwarding agent


What is web forwarding and what advavantages does webforwarding have?

Web forwarding is when you have a website and you want to forward stuff to another website. The advantages of web forwarding is that it makes things a lot easier to do.


When was Airport Freight Forwarding Centre created?

Airport Freight Forwarding Centre was created in 1998.


What is a sentence with forwarding in it?

I'm forwarding this letter on to the head of my committee. That truck belongs to a forwarding company; they send out chips to stores all over the country. The librarians are forwarding the development of library science by creating a whole new method of preserving old documents.