top 50 comments

sorted by: hot top controversial new old
[–] 108 points 4 months ago

they used to call him the deref king back in college

  • source
  • [–] 74 points 4 months ago (11 children)
  • [–] 4 points 4 months ago (8 children)

    Why would I want to be shown the concept of pointers by an eight year old?

  • source
  • parent
  • hideshow 8 child comments
  • [–] 16 points 4 months ago (6 children)

    I'll have you know, she's canonically 300 years old

  • source
  • parent
  • hideshow 6 child comments
  • [–] 15 points 4 months ago (4 children)

    Nah, she's 5 or younger. She lied about being 6 (school age) to get adopted. It's a very wholesome story (if you disregard the war, political intrigue and terrorism).

  • source
  • parent
  • hideshow 4 child comments
  • load more comments (2 replies)
  • load more comments (1 reply)
  • load more comments (1 reply)
    [–] 67 points 4 months ago (15 children)

    Wait. It’s been a long time but shouldn’t be int*** -> int** -> int* -> int ?

  • source
  • hideshow 15 child comments
  • [–] 84 points 4 months ago (11 children)

    I think int*** is meant to be pointing at int**, but the image is just unclear about where everything is in perspective.

  • source
  • parent
  • hideshow 11 child comments
  • [–] 28 points 4 months ago (9 children)

    Pretty sure the image is clear:

    int*** -> int*
    int** -> int
    Int* -> int
    

    Clarity doesn’t mean correct. But that’s probably why it’s posted here. 🤷‍♂️

  • source
  • parent
  • hideshow 9 child comments
  • [–] 9 points 4 months ago

    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

  • source
  • parent
  • load more comments (6 replies)
  • load more comments (1 reply)
    [–] 41 points 4 months ago (1 child)

    Rumble Tumble Games in the wild

  • source
  • hideshow 1 child comment
  • [–] 30 points 4 months ago (1 child)

    Didn't expect to see the Drift King here

  • source
  • hideshow 1 child comment
  • [–] 11 points 4 months ago

    as a python script kiddie, this is way over my head, but upvoted because of RT Game

  • source
  • [–] 8 points 4 months ago (2 children)

    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?

  • source
  • hideshow 2 child comments
  • [–] 8 points 4 months ago* (8 children)

    So, googling it, the general premise is you should use smart pointers instead to avoid crashes. Got it.

  • source
  • hideshow 8 child comments
  • [–] 10 points 4 months ago (2 children)

    Smart pointers implies C++, which is not the right answer.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 6 points 4 months ago (1 child)

    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.

    https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

  • source
  • parent
  • hideshow 1 child comment
  • [–] 7 points 4 months ago (7 children)

    Real talk: is there any practical use-case for T*** of any pointee type?

  • source
  • hideshow 7 child comments
  • [–] 22 points 4 months ago (6 children)

    Dynamically allocated multidimensional arrays.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 12 points 4 months ago (1 child)

    Ah right, so that would be a 3D array.

    • T* is a single row of T
    • T** is a list of rows
    • T*** is a list of "layers" in the third dimension

    This 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.

  • source
  • parent
  • hideshow 1 child comment
  • load more comments (3 replies)
  • [–] 5 points 4 months ago

    C# delegates enter the chat and nod.

  • source
  • [–] 5 points 4 months ago (14 children)

    Now that explain the & part of the pointers that I never really understood.

  • source
  • hideshow 14 child comments
  • [–] 4 points 4 months ago*

    *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.

  • source
  • parent
  • [–] 4 points 4 months ago (1 child)

    Am I a computer scientist now?

  • source
  • hideshow 1 child comment
  • load more comments (1 reply)
    [–] 4 points 4 months ago

    that's not LaurieWired

  • source
  • [–] 3 points 4 months ago

    So, confusing, nonetheless.

  • source
  • [–] 3 points 4 months ago (2 children)

    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?

  • source
  • hideshow 2 child comments
  • load more comments (2 replies)
    load more comments
    view more: next ›