In C, if you want to let a function change a variable (let's call it x), you need to pass it a pointer to x.
If x is a pointer to a pointer (**), in order to let a function edit x, you need to pass it to a pointer to x (in that case, a pointer to a pointer to a pointer ***).
11 Comments
robotica@lemmy.world · 21 pts · 162d
In C, if you want to let a function change a variable (let's call it x), you need to pass it a pointer to x.
If x is a pointer to a pointer (**), in order to let a function edit x, you need to pass it to a pointer to x (in that case, a pointer to a pointer to a pointer ***).
Mac@mander.xyz · 1 pts · 162d
This reminds me of the "and and and and and and and" sentences. lol
skulblaka@sh.itjust.works · 19 pts · 162d
bravesirrbn@lemmy.world · 16 pts · 162d
Only real Three Star Programmers can handle this amount of indirection
SparroHawc@lemmy.zip · 4 pts · 162d
I love how "Three-Star Programmer" is a perjurative term in C/C++ circles.
kylie_kraft@lemmy.world · 13 pts · 162d
yo dawg
gigastasio@sh.itjust.works · 8 pts · 162d
Why did I get slightly aroused by this?
Treczoks@lemmy.world · 2 pts · 161d
Are you? This is plain and simple C.
Jankatarch@lemmy.world · 2 pts · 160d
Imagine the innermost is function pointer.
fubarx@lemmy.world · 1 pts · 161d
Villain flashback backstory for the Rust movie.
Tudsamfa@lemmy.world · 1 pts · 161d
Statements dreamed up by the utterly deranged.