Explain pointers to me like if I was a dumb nigger

explain pointers to me like if I was a dumb nigger

Attached: ba.png (2237x1928, 1.72M)

A pointer type may be derived from a function type or an object type, called the referenced type. A
pointer type describes an object whose value provides a reference to an entity of the referenced
type. A pointer type derived from the referenced type T is sometimes called "pointer to T".
The construction of a pointer type from a referenced type is called "pointer type derivation".
A pointer type is a complete object type.

straight from the C standard. cut the fucking bullshit analogies out. just read that until you understand it.

memory is like boxes.
each box has a number.
their number is the adress.

a pointer holds an adress. an adress is a reference.
when you dereference a pointer you go look whats at the adress.

in the example here lets say you have a pointer.
if it points to your first memory space (box) it has the number 1.

so the value of your pointer is 1. the adress of the object it points to.

when you dereference a pointer you go look whats at the adress/value of the pointer.

in our example, if the pointer points to element nr 1, its value will be 1, and when you dereference it you get the value at that address:
42

forgot picrel

Attached: pointers.png (692x276, 10.16K)

a pointer is an index into memory, byte by byte

Attached: pointer.jpg (469x469, 17.19K)

Attached: Untitled.png (643x228, 6.95K)

You know when you have the address of an old friend that you haven't seen in ages, so one day you decide to visit him, so you go to the address and you knock on the door, but suddenly there is a gay couple there living together and they tell you "Oh, no. He moved because he was poor. This is his new address", so they hand you the address and you check that your friend lives in the bad part of town, and you are wondering if you should go there, or just make new friends?

That is how pointers work

aight so a basehead comes up to where you trappin and wants a dime.

you take the money and point down the alley to the kid you got holdin' the actual bags.

in this situation you're the pointer, pointing to where the rock actually be.

it's literally just a location, just like geo coordinates. Except instead of telling you a place on earth it's tell you where some data is in your RAM

Why are you so pissed about analogies?

kill yourself fotm trash tranny

because he understood pointers through a toddler tier analogy and pretends to understand what the hell that garbage text even means

I really don't know what's wrong with him. I've seen his posts he's always complaining about analogies.

What’s the point of pointers? Seems like extra steps.

>What's wrong with all the neighbors in my block having the same address number? seems like extra steps

Your RAM is a big array.
When you create a variable, it goes somewhere in that big array.
A pointer is that variables index in the big array.

80% right.

Lets imagine a computer with 6 memory addresses.
>1 2 3 4 5 6

At address "2", there is pointer "x", which points to address 4.
>2: x = 4

at address 4, the integer 100 is stored.
>4: 100

The pointer "x", which is stored at address 2, points to address 4, which contains the integer 100.

Consider pointers to be normal variables, but they just point to an address. Addresses are just a location in memory.

This is why people need to be exposed to assembly as their first language. Not python.

read picrel page to page before making another r/eli5 thread again

Attached: 81ZugrP5S3L.jpg (2097x2560, 333.43K)