• Tolookah@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    He forgot to allocate his leg.

    Also, it looks like he pointed to foot correctly. I’m surprised he didn’t shoot his hand, the pointer to a pointer to a foot.

  • Codex@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    This is why I stick to Rust. The gender affirming surgery takes some getting used to, but at least I have both legs.

  • observantTrapezium@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I’ve heard this trope before but I’m skeptic. I’m not a C expert but I can’t believe memory bugs in that language are so much more benign than in C++.

    • xmunk@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      It is indeed a trope and a mostly false one - C++ introduces more dramatic ways to footgun yourself but a plethora of tools to make it easier to avoid them - in particular the built in library functions actually encourage good C++ programming practices…

      Well, let’s just ignore gets().