>void p* = &x;

>void p* = &x;

  1. 2 weeks ago
    Anonymous

    >cniles think this is readable code

    • 2 weeks ago
      Anonymous

      I still maintain my theory that you are the only frogposting homosexual in this board who uses the word "cnile". Just go somewhere else, dude.

      • 2 weeks ago
        Anonymous

        I might shitpost a little here and there, but calling me a frogposter is going too far. Fuck you.

  2. 2 weeks ago
    Anonymous

    Nobody here knows how pointers actually work.

    • 2 weeks ago
      Anonymous

      Nor should they.
      Learning C++ today is like trying to learn how to drive a bicycle from 1860.
      Better to learn how to cycle on a modern bicycle instead.

      • 2 weeks ago
        Anonymous

        Are 19th century bicycles really that fundamentally different from 21st century bicycles?

        • 2 weeks ago
          Anonymous

          Yeah, e.x. a wide adaptation of gearing system

      • 2 weeks ago
        Anonymous

        reust tranny

      • 2 weeks ago
        Anonymous

        >Nor should they.
        This.

        Pointers are ridiculously simple. It is literally just an address in memory.
        What people don't teach you is that the reason pointers are """hard""", is because they're hard to use and reason about. Use after free etc.
        There's nothing else to know. It's literally just a matter of git gud.

        Every time you deference a pointer the underlying system sends an email to Bjarne Stroustrup who has to look up your memory address in a giant spreadsheet and then sends it back to you your pc via sms-over-html where it's interpreted by your cpu using special hardware registers.

      • 2 weeks ago
        Anonymous

        Fucking stupid analogy.

      • 2 weeks ago
        Anonymous

        its quite amazing how monoculture rust troons are, they were shilliing helix vim clone the other day and i could just tell by looking at it was yet another remake other thing in rust project beofre looking i just knew

        • 2 weeks ago
          Anonymous

          It’s as if Neovim and Kakoune had a baby that was deformed and retarded with no upgradability. It has more keys to press for an edit in kak or vim.
          >t. Kak enjoyer
          Fuck rust trannies and their “I rewrote this in rust” cancer

          • 2 weeks ago
            Anonymous

            Helix is better because I don't have to write code to make my editor do things it should just do. I'm sorry you're too retarded to understand.

      • 2 weeks ago
        Anonymous

        >how to drive a bicycle from 1860.
        The fuck he meant by this?

        • 2 weeks ago
          Anonymous
    • 2 weeks ago
      Anonymous

      Pointers are ridiculously simple. It is literally just an address in memory.
      What people don't teach you is that the reason pointers are """hard""", is because they're hard to use and reason about. Use after free etc.
      There's nothing else to know. It's literally just a matter of git gud.

      • 2 weeks ago
        Anonymous

        >t. Dunning Kruger retard
        No, they aren't. They have a type and also have provenance. A random address without any valid object isn't a well defined pointer.

        • 2 weeks ago
          Anonymous

          >pointers have a type
          nu-uh

        • 2 weeks ago
          Anonymous

          >akshually

        • 2 weeks ago
          Anonymous

          Bro I don't give a fuck about C++ or Rust or whatever you pulled shit out of

          • 2 weeks ago
            Anonymous

            >object
            anyways yes it is. on x86 dereferencing that address will signal a page fault.

            I'm talking about the C standard which is platform independent. It describes an abstract machine.

        • 2 weeks ago
          Anonymous

          >object
          anyways yes it is. on x86 dereferencing that address will signal a page fault.

        • 2 weeks ago
          Anonymous

          >A random address without any valid object isn't a well defined pointer
          and yet void* pointers ARE well defined in the standard.

        • 2 weeks ago
          Anonymous

          >A random address without any valid object isn't a well defined pointer.
          void* p = (void*)1234;

          Compiles fine because a random address without any valid object is literally ALL a pointer is.

          void* p = (void*)1234;
          int* q = (int*)p;

          Also compile fine because you are promising the compiler(you are lying) that the address 1234 really is readable and really does contain an int. Or a Foo or whatever other type you want to use.

          For all you know, 1234 could be readable on the machine and if it is, then data can indeed be interpreted as an int. It is the programmers job to manage the memory and its meanings, not have this task dogmatically imposed by ineffectual committees of Californian insiders.

          • 2 weeks ago
            Anonymous

            >compiles fine
            still UB and summons nasal demons

            • 2 weeks ago
              Anonymous

              C:

              Type error, not same type!
              Developer: the types are compatible, fuck you, I'll just typecast it

              Other typed languages:

              Type error
              Developer has to go through the motions to convert the type

              Untyped languages:
              Lol unexpected behaviour

            • 2 weeks ago
              Anonymous

              It is not UB, lol. It will compile to what you are telling him to compile, maybe you think assembly is UB.

              https://godbolt.org/z/3Kc8YM7E8

              For example, the address of VGA text mode is always 0xB8000.

    • 2 weeks ago
      Anonymous

      A pointer holds the value of an address in your PDP-11's memory. It's that simple.

  3. 2 weeks ago
    Anonymous

    >"Void P Star Equals And X Semicolon"
    OP, try translating your headlines from Martian before posting them.

  4. 2 weeks ago
    Anonymous

    shouldn't it be
    > void * p = &x;
    ?

    • 2 weeks ago
      Anonymous

      Yes the star comes before, i'm sorry

      • 2 weeks ago
        Anonymous

        you have failed in your duty anon. Your punishment will be a return to Python Purgatory

  5. 2 weeks ago
    Anonymous
  6. 2 weeks ago
    Anonymous

    i think assembly should be the first cs class in order to weed out everyone who cannot understand pointers and memory in general

    • 2 weeks ago
      Anonymous

      Yes, that way we could leave only the straight white males.

    • 2 weeks ago
      Anonymous

      Why? What university program doesn't force you to at least take MIPS assembly programming anyhow? Nothing about assembly is problematic outside of the levels of garbage that AArch64 and x86 expose to reduce code sizes. No one would learn anything of value from modern asms, outside of maybe risc-v since it's so patent averse and mostly simplistic outside of variable length instructions.

  7. 2 weeks ago
    Anonymous

    void *p = &p;

  8. 2 weeks ago
    Anonymous

    > Array<int const * const> const * const my_const_array_do_not_touch

  9. 2 weeks ago
    Anonymous

    Post was so good to the point OP failed to declare a pointer properly kekw.

  10. 2 weeks ago
    Anonymous

    im convinced the rust push is inorganic paid shills cause of its MIT cuck license dont get me wrong i love bsd's

    • 2 weeks ago
      Anonymous

      don't look into the totally real companies who "amplify black voices" that mozilla gives millions to every year! Surely those are ACTIVIST organizations and totally not fronts used to market!

  11. 2 weeks ago
    Anonymous

    >exclaim that c++ is a retarded language
    >immediately all the cniles come out and screech about rust
    Jesus. Rust is merely slightly less retarded, calm your fucking tits.

  12. 2 weeks ago
    Anonymous

    not a single mention of the anatomy of a virtual memory address on linux / windows

  13. 2 weeks ago
    Anonymous

    I should've asked her out. why did I think a woman could do systems programming projects on her own?

    she looked like Aubrey Plaza.

  14. 2 weeks ago
    Anonymous

    What am i even looking at?

  15. 2 weeks ago
    Anonymous

    uintptr_t* p = &p;

Your email address will not be published. Required fields are marked *