• esa
      link
      fedilink
      arrow-up
      15
      ·
      12 hours ago

      >What is C++? A miserable huge pile of "should"s

    • Kwdg
      link
      fedilink
      arrow-up
      24
      arrow-down
      1
      ·
      15 hours ago

      Not needed, main in C++ implicitly returns 0 if there is no return

      • Lucy :3@feddit.org
        link
        fedilink
        arrow-up
        8
        arrow-down
        6
        ·
        14 hours ago

        Should ≠ Needs to

        You can do it, and it will work, but it’s unclean and not best-practice. I wouldn’t be surprised if it’s undefined behaviour.

        • xmunk@sh.itjust.works
          link
          fedilink
          arrow-up
          19
          ·
          13 hours ago

          Just to clarify. It is defined behavior - there’s plenty of undefined behavior in C but that ain’t one of them.