Worse version of this


Worse version of this


Null termination is no longer recommended, use fat pointers instead!
I'll have you know, she's canonically 300 years old
And the fact that Anya's best friend is trying to break up Anya's parents because she has a crush on the dad
I was just making a joke
El terrorismo makes it more holesome.
It's a good reference (lol) even if it's getting downvoted
Wait. It’s been a long time but shouldn’t be int*** -> int** -> int* -> int ?
int** is inside a TV, and persumably int* must be inside another TV(even though uts not edited in). The image perespective is showing one thing inside the other, inside the other. So when when int*** points the TV it reference int**, which reference int* which reference int. Its just edited very bad
But that doesn't hold up, because RT** isn't pointing at a TV containing RT* only RT*** is pointing at an TV containing RT** RT* and RT
What's the * for again?
That one's a typo
I mean, that's pretty much what happens to me every time I try to use pointers, so the meme checks out.

That's not the end of the chain either, right?
Because : int -> &int -> &&int
Or can you not use the address operator like that? It also might be int& &, I failed cs2200 on this exact type of technicality
Seeing him break containment is wild
as a python script kiddie, this is way over my head, but upvoted because of RT Game
Why should the left one in the rectangle be int**? It doesn't make sense to me, they are both clearly just int*
What am i missing?
I they're supposed to be pointing at each other but the edit didn't really work because his arm is pointing too far away
So, googling it, the general premise is you should use smart pointers instead to avoid crashes. Got it.
Smart pointers implies C++, which is not the right answer.
Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are very many very bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles.
Considering that most of the "answers" I've found on StackOverflow were complete dogshit, I'm wary of this reading list
Uh
I think I'll just let the cat drive instead
They all have footguns that cause different crashes.
If you want to do explicit memory access without inevitable safety problems, you need Rust. That's the whole hype with Rust.
But... per-process-isolation is a hardware feature, no?
Sure, that may be (it's definitely not in userspace). But don't forget it works by crashing your program.
Dynamically allocated multidimensional arrays.
Ah right, so that would be a 3D array.
T* is a single row of TT** is a list of rowsT*** is a list of "layers" in the third dimensionThis would be incredibly hazardous to pass around as a bare pointer with no context, though. I'd expect to see this in a struct that, at minimum, also includes fields for the size of each dimension.
This Sparta C. We live for danger.
Where?
In the C programming language. Or do you mean which C project specifically? Because as Technus surmises in their response, it's usually a better idea to set up aliases (typedefs or heck, even #defines) so that you're offloading some of the mental strain keeping track of the layers, and that's likely to be what happens in production code.
But the underlying data type is still T***.
C# delegates enter the chat and nod.
Am I a computer scientist now?
No, you need to learn a lot more. Other programming concepts, programming paradigms, algorithms, and many more.
Now that explain the & part of the pointers that I never really understood.
The & operator references the value.
int i;
int* p = &i;
In C++, the & at the function argument makes it a reference type (safe pointer).
void someFunction(int& refVal) {
[...]
}
As someone who likes working with higher level languages, I never understood the pass by reference or even referencing different pointers. It never stuck out to me as useful in what I want software to do. It’s too close to hardware.
if you're working with higher level languages you pass-by-reference all the time. give a list to a function to modify it? that's by reference. giving an event handler function to a framework? that's by reference. setting a property on an object? that's usually by reference.
the list is the helpful part to understanding it.
it would be terrible if, with bar being a list and foo being a member of the list
if foo in bar: return true
modified the list. So yeah, you want to look at the list not edit the list, it's a pointer.
Most of the time you pass by reference for more outputs, or by const ref to avoid copying a big-ass data structure (which is not always straightforward, with structures smaller than a pointer, which are pretty big in 64 bits architecture, you lose more to the ref overhead than to the copy IIRC)
Another reason I commonly see: to change the structure / "main pointer" to a data structure (esp during freeing and cleanup).
Reference values are quite useful, such as:
double valOut;
if (parseDouble(valOut) == 0) { //Argument of parseDouble is ref type, no & needed for input, no exceptions needed for error handling
[...] //No error, code executed normally
} else {
[...] //Erroreus input
}
*x = dereference or "point to". Treats the variable x as containing a pointer value. Evaluates to a variable existing at the address in x.
&x = reference or "get address of". Evaluates to the address of x.
They're complimentary operators, so *(&x) cancels out and is equvalent to just x.
Uh I'm a charisma class (with unfortunate base stats) what's int
The placement of the labels is a bit sloppy but I think it tracks. The character in the middle (int*) is pointing at int, then the one on the left (int**) is pointing at the middle one (int*), etc
What I want to know: what is that shirt and where do I get it?
So it's like a mystical artifact of the computational Big Bang? You deref a pointer to the very beginning of Unix time and bam, suddenly you're styling like Richard Stallman?
@programming.dev
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
go to feed...
@programming.dev
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
go to feed...
they used to call him the deref king back in college
save