>just dedicate 4 hours of your life to learn pointers bro

>just dedicate 4 hours of your life to learn pointers bro

Homeless People Are Sexy Shirt $21.68

Shopping Cart Returner Shirt $21.68

Homeless People Are Sexy Shirt $21.68

  1. 2 years ago
    Anonymous

    why do you need 4 hours to understand pointers

  2. 2 years ago
    Anonymous

    >he got filtered by computer memory

  3. 2 years ago
    Anonymous

    >just dedicate 30 seconds of your life to learn pointers bro

    • 2 years ago
      Anonymous

      kek I made the original image, it's always fun to still see it being shared

      • 2 years ago
        Anonymous

        Did you post it in a Facebook group?

    • 2 years ago
      Anonymous

      I like pic related better

      • 2 years ago
        Anonymous

        homosexual cartoon lover

      • 2 years ago
        Anonymous

        [...]
        [...]
        >Wojackposter
        >has the ubris to call homosexual anyone else

        [...]
        [...]

        Kys Black person

      • 2 years ago
        Anonymous

        based and cute-pilled. The others hate it because they dont understand it.

      • 2 years ago
        Anonymous

        I still think double pointers are double moronic.
        >duuuuude like what if *smokes joint* we have like a - get this - POINTER to a pointer? Like wHoA so DEEP!
        But seriously, you know the whole reason double pointers even exist (when just having a singular pointer works just fine) is because soiboy normieBlack person programmers think pointers are heckin scary and unsafe.
        Frick I'm tired of having to deal with them when writing 64 windows applications in assembly. So many wasted cycles on pointless bullshit.

        • 2 years ago
          Anonymous

          it's generally used as an argument for functions where you want whatever pointer you're intending to use, to be updated. outside of that it's rare (besides char**)

        • 2 years ago
          Anonymous

          >Watching a 4 hour video to learn pointers
          Do yourself a favor and read this document instead. It'll take you less time, and you won't be able to just put it on in the background while you don't learn anything.
          http://cslibrary.stanford.edu/102/PointersAndMemory.pdf

          I am parsing a language of some sort, and I need a store for tokens within the language. To accomplish this, I create a vector of strings. C doesn't know what a vector is, or for that matter, what a string is. To implement the vector, I use a pointer to a data buffer, a size field, and a capacity field. For the strings, I use a pointer to the first character of a sequence of characters terminated by a null byte, as is standard for most string processing libraries in C. My data pointer is, in effect, a char**.

          You will find code like this all over the place. Double indirection is completely normal, and you can bet your ass that the equivalent in other languages is a double pointer under the hood.

      • 2 years ago
        Anonymous

        cute!!

        I still think double pointers are double moronic.
        >duuuuude like what if *smokes joint* we have like a - get this - POINTER to a pointer? Like wHoA so DEEP!
        But seriously, you know the whole reason double pointers even exist (when just having a singular pointer works just fine) is because soiboy normieBlack person programmers think pointers are heckin scary and unsafe.
        Frick I'm tired of having to deal with them when writing 64 windows applications in assembly. So many wasted cycles on pointless bullshit.

        do you even use double pointers? i cant even imagine a situation where I would use them

        • 2 years ago
          Anonymous

          every time you need an array of strings, that's double pointers. i presume you realize this is a really common situation

        • 2 years ago
          Anonymous

          The win32 API is full of double pointers.

        • 2 years ago
          Anonymous

          linked list

          • 2 years ago
            Anonymous

            Linked lists don't have double pointers. It's
            Pointer to previous entry (or null)
            Entry
            Pointer to next entry (or null)

        • 2 years ago
          Anonymous

          >array of strings
          >2D staggered arrays
          >doing array allocation inside a function
          inb4 "I do all my allocations inline". Nice fizzbuzz bro.

          • 2 years ago
            Anonymous

            >array of strings
            You only need one pointer to the first entry. 'Arrays of strings' is literally just n amount of characters laid out in contigous memory interspaced with newline characters. Zero reason for a double pointer. As for allocation, you just need to get the final address to the variable and then just chuck out the pointer to the pointer.

          • 2 years ago
            Anonymous

            >want to change one string
            >have to realloc the entire buffer
            Real big brain thinking bro.
            Listen, just start working on a C project with more than your 100 lines fizzbuzz shit and maybe you'll become less of an opinionated freshman shitter.

          • 2 years ago
            Anonymous

            >doesn't even realize that's what happens internally anyway
            You're one to be talking, moron.

          • 2 years ago
            Anonymous

            lmao, what is it exactly that you believe? That every time you realloc some buffer all the other buffers in your program also get realloced?
            Freshmen really say the darnedest shit.

      • 2 years ago
        Anonymous

        It is certainly cuter

      • 2 years ago
        Anonymous

        kys

      • 2 years ago
        Anonymous

        They hated him for he told the truth

      • 2 years ago
        Anonymous
      • 2 years ago
        Anonymous

        I don't even write C++ (my company's embedded team uses it), and I think the image just helped me unironically get both that syntax meaning and what it's supposed to do. Well done.

      • 2 years ago
        Anonymous

        Based!

        • 2 years ago
          Anonymous

          screamers were better back in the day

        • 2 years ago
          Anonymous

          Rent free

      • 2 years ago
        Anonymous

        >IQfy x Family
        stay here

      • 2 years ago
        Anonymous

        The sheer amount of pol election tourist soijack kiddos that were triggered by this picture is both hilarious and sad.

        • 2 years ago
          Anonymous

          Sad indeed. Seems they're all lost conformists striving to be the same miserable, reactionary shitbag.

    • 2 years ago
      Anonymous

      [...]

      homosexual cartoon lover

      >Wojackposter
      >has the ubris to call homosexual anyone else

      • 2 years ago
        Anonymous

        >ubris

      • 2 years ago
        Anonymous

        [...]
        [...]

        [...]
        [...]
        Kys Black person

        >triggered weebs immediately start sperging out
        pottery

      • 2 years ago
        Anonymous

        >I'm feeling more like a boomer today
        That one got me

    • 2 years ago
      Anonymous

      Thanks I understand pointers now

    • 2 years ago
      Anonymous
      • 2 years ago
        Anonymous

        Not the same actually (technically it is when compiled, but frick you here's my "um actually").. The bracket notation is specifcally used to indicate a collection, aka the array. The pointer to a pointer is used to indicate a singular end point. Of course both are simply points in memory, and when compiled it makes absolutely zero difference (assuming you don't initialize the array or declare its size), but when you write code, it helps to know when to use one over the other.

        • 2 years ago
          Anonymous

          You're referring to pointer decay. The [] operator decays into *, just with loss of dimension.

    • 2 years ago
      Anonymous

      I like the one with void pointers more because it's an actual void.

  4. 2 years ago
    Anonymous

    >wow maaaan 4 hours is like a lot
    >just imagine how much porn I can watch instead

  5. 2 years ago
    Anonymous

    >C/C++ in 2022
    lmao stay poor

    • 2 years ago
      Anonymous

      This! So much this! Rust will fricking DEPRECATE C/C++, can I get an amen Rust sisters?

    • 2 years ago
      Anonymous

      >Recently got hired as a C programmer
      Feels good man.

      • 2 years ago
        Anonymous

        >got hired as a C++ dev after graduating last month
        >155k salary
        Feels good

        The LARP continues

    • 2 years ago
      Anonymous

      >got hired as a C++ dev after graduating last month
      >155k salary
      Feels good

    • 2 years ago
      Anonymous

      >poor
      Coding in C++ payed off my mortgage years ago. Go back to your amateur Rust circle jerk, homosexual.

  6. 2 years ago
    Anonymous

    ok, not every language has pointers, but every reference has indirection, which is the only "hard" part about pointers. if you dont understand indirection you cant be a real programmer, it's that simple.

  7. 2 years ago
    Anonymous

    4h is nothing for such a fundamental concept you'll know all your life.

  8. 2 years ago
    Anonymous

    Rust doesn't have this problem.

    • 2 years ago
      Anonymous

      Rust references are the same thing as C pointers, but gimped.

      • 2 years ago
        Anonymous

        And that's a good thing.

    • 2 years ago
      Anonymous

      >Rust doesn't have this feature
      ftfy

      • 2 years ago
        Anonymous

        it does, it's *const T and *mut T, go ahead have a nice day in the foot if you want

  9. 2 years ago
    Anonymous

    pointers "point" at a location in memory. What's so difficult to understand about it?

    • 2 years ago
      Anonymous

      >here is your variable
      >okay
      >except you can't deadname the variable you have to make up a new name for it instead
      >uh fine
      >also this fricks up how data is passed so rtfm to figure out how this shit works
      >I just wanted to pass a string 🙁

  10. 2 years ago
    Anonymous

    what is a pointer? Is it same as a reference to a memory sequence?

    is an javascript object something like a "pointer"?

    • 2 years ago
      Anonymous

      Javascript uses pointers for every object implicitly, yes. That's why
      let obj = {};
      let obj2 = obj;
      obj.msg = "Hello";
      console.log(obj2.msg);
      Works.
      In C all references have to be explicit and = makes a copy of the data instead of a copy of the reference. That's one thing pointers are for.

      • 2 years ago
        Anonymous

        C doesn't have references, javascript doesn't have pointers. They are not the same thing.

        • 2 years ago
          Anonymous

          A reference is a general computer science concept that existed before seeples came around. Which is why the * operator is called a dereference even in C.
          God I fricking hate seeples cargo cultists who can't tell C++ syntax appart from scientific vocabulary.

          • 2 years ago
            Anonymous

            >A reference is a general computer science concept that existed before seeples came around.
            Nowhere was C++ mentioned. We're talking about C. Also, a reference was not a "general computer science concept" until later, when newer OO and scripting/interpreted languages were created.

            >Which is why the * operator is called a dereference even in C.
            Fun fact, it's not actually called the "deference" operator, but the "indirection" operator. "Deference" is just shorthand jargon that's more self-explanatory, but no longer technically correct, and no longer used because it refers to a completely different concept from what pointers are.

            >God I fricking hate seeples cargo cultists who can't tell C++ syntax appart from scientific vocabulary.
            Great. Thank you for sharing your opinion with the class. But also remember that we're talking about C pointer vs references, and that things like Java references and C++ references are not the same. In general, references aren't the same thing as pointers.

            If you want a little more detail, you can look here: https://softwareengineering.stackexchange.com/a/141838
            Or do some googling yourself, assuming you can pull your fingers out of your boyfriend's butthole.

          • 2 years ago
            Anonymous

            >points to a SE thread talking about Java references
            C has references. Pointers are an implementation of references. You don't understand the difference between language-specific syntax and CS concepts.
            >it's not actually the "dereference" operator, but the "indirection" operator
            Indirection is the implementation, dereferencing is the concept. The C specifications use both wordings.
            Try going further than the first StackExchange thread next time you israelitegle 🙂

          • 2 years ago
            Anonymous

            >In general, references aren't the same thing as pointers.
            They are both implemented using machine addresses (unless optimized out) and so have some aspect of indirect nature to them, but sets of operations they support are different.

    • 2 years ago
      Anonymous

      >what is a pointer?

      • 2 years ago
        Anonymous

        a pointer is a variable that identifies itself as a pointer.... simple as, chud

        • 2 years ago
          Anonymous

          but why? So I can call varB when I want to call varA? Just to make shit more complicated in case I'm bored at work?

          • 2 years ago
            Anonymous

            you didnt get the joke... I guess you must watch the documentary first to get the "references"

          • 2 years ago
            Anonymous

            its literally what

            > data lives somewhere in memory
            > when code is run, variables on the stack get assigned to a memory address
            > the address a variable points to can change independently of the data

            https://icarus.cs.weber.edu/~dab/cs1410/textbook/4.Pointers/vars_address.html

            But I'm a complete noob, so I could be wrong

            described so I don't get the joke

          • 2 years ago
            Anonymous

            In the documentary "What is a woman" liberals can't give you a real definition, besides "A woman is someone who identifies as a woman" (which is a circular definition)

          • 2 years ago
            Anonymous

            >Who's Brandon
            >he's the guy who will say "My name is Brandon"
            come on, dude

          • 2 years ago
            Anonymous

            brandon is not a category

          • 2 years ago
            Anonymous

            neither is gender

          • 2 years ago
            Anonymous

            "French" is a category and it's still circular
            You can vaguely gesture at the geographical area and continuity with various states but ultimately French is whatever people say is French

            neither is gender

            Of course it is, what are you smoking?

          • 2 years ago
            Anonymous

            >You can vaguely gesture at the geographical area and continuity with various states but ultimately French is whatever people say is French
            continuum fallacy

          • 2 years ago
            Anonymous

            No, not at all.
            Can you define "French" and "France" for me in a non-circular way?

          • 2 years ago
            Anonymous

            France is defined by french borders. Fuzzy borders, but borders nonetheless.

          • 2 years ago
            Anonymous

            The borders that are just whatever various governments agree they are? The ones that are not grounded in material truth but in politics? The ones that can be redefined by fiat without thereby lying?
            My country was part of France under Napoleon, but we didn't self-identify as French, some surgery was performed at Waterloo, and then we were no longer French.
            We use malleable circular subjective definitions all the time. Of course you can think that it's moronic to use one of those for gender, but the basic idea is nothing new.

          • 2 years ago
            Anonymous

            At least it's a criterion. It's not incontrovertible but it's something which can be acknowledged and discussed.

            In the documentary "What is a woman" liberals can't give you a real definition, besides "A woman is someone who identifies as a woman" (which is a circular definition)

            doesn't posit anything. Not even qualities associated with femininity. That would at least be a definition. "A woman is anything which says it is woman" is a non-definition and meaningless. "A woman is someone which does womanly things like x, y, z" would be a definition even if not everyone who does x, y or z is a woman.

          • 2 years ago
            Anonymous

            On the contrary, I think

            In the documentary "What is a woman" liberals can't give you a real definition, besides "A woman is someone who identifies as a woman" (which is a circular definition)

            is a criterion but not a description. (It's not a criterion I fully agree with. But it is a criterion.)
            France is whatever the world agrees is France. This is a perfectly fine criterion that allows you to tell whether something is France, even if it tells you absolutely nothing about what France is like.
            If someone came up to you with a camera and a microphone and asked you to define France, what would you say? I'm genuinely curious. I don't think I'd be able to come up with something informative and non-circular in the spur of the moment.
            If you asked me to describe some French qualities then I wouldn't have to be exhaustive or exclusive and so I could rattle off some things about Paris and languages d'oïl and baguettes. It's a completely different question.
            (I haven't watched the documentary, but I heard the presenter defines "woman" as "adult human female", which is just passing on the buck to the word "female". That's not a good sign. Plato already figured out that some words are hard to define, Wittgenstein had more to say about that.)

          • 2 years ago
            Anonymous

            You can't use the fricking subject in question in its own definition...

            Imagine in school...
            T: Give me the definiton of a car?
            You: A car is something that looks like a car...

            They would put you in the down syndrome class. Only in leftist circle does such moronation pass..

          • 2 years ago
            Anonymous

            Can you define France for me?

          • 2 years ago
            Anonymous

            France is a country in Europe, neighbouring to Germany on its easter side and Spain on its western border...

            You fricking moronic c**t. It's not "something that looks like france"....

          • 2 years ago
            Anonymous

            If Spain falls apart does France cease to be France?
            You're trying to narrow it down but you're not describing France's essence at all. Your definition might as well be circular, it's just taking arbitrary facts that happen to be true about France right now but aren't vital.
            Would you define a chair as "that thing they sell at the IKEA"? No, you'd define it as "a piece of furniture for sitting". Can you do the second kind of definition for France?
            The best I can come up with is something like "the territory generally recognized to be part of France". Circular, but not arbitrary.

            There's a whole book on move semantics
            https://www.amazon.com/Move-Semantics-Complete-Guide-First/dp/3967309002

            I once ran into a debate between two well-respected C++ experts about what it even means for moved-from objects to be valid. That was one of the things that convinced me that C++ is deeply unhealthy.
            Maybe Rust's approach of "a move is a memcpy no matter what, moved-from values are untouchable unless they're Copy" is too restrictive but it's been pretty painless.

          • 2 years ago
            Anonymous

            >a move is a memcpy no matter what, moved-from values are untouchable unless they're Copy
            Memcpy semantics are coming in C++26(?). We will have ALL the semantics.

          • 2 years ago
            Anonymous

            France is a unitary semi-presidential republic in the European Union

          • 2 years ago
            Anonymous

            So is Romania. Is Romania France?

          • 2 years ago
            Anonymous

            Yes, romania is france anon, didnt you know?

          • 2 years ago
            Anonymous

            look, even apple gay os can give you a definition which is not circular... otherwise, whats the poitn of the fricking definition. If I dont know the word france, how willl your down syndrome definiton help me "France is something that looks like France."

            you are legit moronic lol

          • 2 years ago
            Anonymous

            oh no, I don't feel so good trans sisters

          • 2 years ago
            Anonymous

            >The borders that are just whatever various governments agree they are? The ones that are not grounded in material truth but in politics?
            LOL
            >Pyrenees -> mountain chain
            >Alps -> mountain chain
            >Atlantic Ocean
            >Manche
            >Rhin
            >Mediteranean Sea
            stfu philocuck

          • 2 years ago
            Anonymous

            >The borders that are just whatever various governments agree they are? The ones that are not grounded in material truth but in politics?
            >a political concept (country) is defined by politics
            the frick else were you expecting

          • 2 years ago
            Anonymous

            No, not at all.
            Can you define "French" and "France" for me in a non-circular way?

            France
            Frence
            Frince
            Fronce
            Frunce
            Frynce

            Now you know why its called French Fry.

            Cause they got fried in WW2.

          • 2 years ago
            Anonymous

            >libs == owned

          • 2 years ago
            Anonymous

            Brandon and women are both nouns.

          • 2 years ago
            Anonymous

            Can't wait for a civil war in America. It would be such a kino.

    • 2 years ago
      Anonymous

      A reference refers to different things in different languages. Sometimes it can refer to an object alias, sometimes it just means a copy of the data is made when dealing with assignment. It depends on how the language and compiler implements it.

      Pointers are points in memory.

      As god once commanded, go forth and google.

  11. 2 years ago
    Anonymous

    4 whole ours? Bro I can't do that. I have tik toks to watch.

  12. 2 years ago
    Anonymous

    It took me a week when I was 18

  13. 2 years ago
    Anonymous

    I actually think you'd be hard pressed to comprehensively cover pointers in 4 hours. You'd have to go over:
    >the basics
    >reading the moronic declaration syntax
    >alignment
    >aliasing (incl. strict aliasing and restrict)
    >volatile
    >arithmetic and comparison (incl. all the possible UB) and relation to arrays
    >function pointers
    >provenance
    But I'm sure that's not the content of this video. It probably spends most of its time covering pointer-adjacent topics like stack and heap and implementing some linked data structures.

    • 2 years ago
      Anonymous

      huh?

      • 2 years ago
        Anonymous

        https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2263.htm

        • 2 years ago
          Anonymous

          >They may also treat pointers based on different origins as distinct even though they are bitwise identical.
          That's fricked up.

  14. 2 years ago
    Anonymous

    what is a pointer?

  15. 2 years ago
    Anonymous

    Nothing to it.

    • 2 years ago
      Anonymous
  16. 2 years ago
    Anonymous

    > data lives somewhere in memory
    > when code is run, variables on the stack get assigned to a memory address
    > the address a variable points to can change independently of the data

    https://icarus.cs.weber.edu/~dab/cs1410/textbook/4.Pointers/vars_address.html

    But I'm a complete noob, so I could be wrong

    • 2 years ago
      Anonymous

      >> the address a variable points to can change independently of the data
      but why

      • 2 years ago
        Anonymous

        because you didn't define it as a const pointer.

  17. 2 years ago
    Anonymous

    Just use Perl
    my $var;
    my $ref_to_var = $var;
    my $value_of_var = $$var; # dereference

  18. 2 years ago
    Anonymous

    >4hours
    It takes a few seconds for a non-Black person.

  19. 2 years ago
    Anonymous

    >*++*argv

  20. 2 years ago
    Anonymous

    [...]

    homosexual cartoon lover

  21. 2 years ago
    Anonymous

    >dedicate 4 hours
    you mean I have to literally do something instead of just binge tutorials on youtube?

    frick no! if it weren't for the fricking boomers I would already know pointers

  22. 2 years ago
    Anonymous

    4 hours to learn pointers is a pretty good investment. Even if you don't use them you'll at least understand more about what's going on with computers and data.

  23. 2 years ago
    Anonymous

    If you don't understand pointers in about one minute you are literally a moron.

  24. 2 years ago
    Anonymous

    How are pointers even real?
    They are just unsigned integers that correspond to memory locations.

  25. 2 years ago
    Anonymous

    >He hasn't read books solely dedicated to pointers and dma

    ngmi

  26. 2 years ago
    Anonymous

    >not watching videos at 1.5x speed
    NGMI

  27. 2 years ago
    Anonymous

    >thread has already been reduced into a discussion of """politics""" and trannies just like every other thread on every other board
    surely there must be a better way to keep the thread bumped

    • 2 years ago
      Anonymous

      I hate nu/misc/ election tourists and their weird obsession with trannies and groomers.

    • 2 years ago
      Anonymous

      sorry mate, banned on /misc/ so I have to be here... it's not fun for me either, but lets make it as painless as possible for the next 3 days...

      maybe tell the /misc/ mods to stop being fricking ban happy c**ts?

      • 2 years ago
        Anonymous

        jesus fricking christ just have a nice day Black person. you re the fricking containment board cancer that has ruined this website. no one wants you irl and no one wants you here. frick off.

  28. 2 years ago
    Anonymous

    There's a whole book on move semantics
    https://www.amazon.com/Move-Semantics-Complete-Guide-First/dp/3967309002

  29. 2 years ago
    Anonymous

    To me the hard part about pointers wasn't what they were/how they worked, it was the purpose of them and how it was distinct from other types.

    • 2 years ago
      Anonymous

      the purpose of them is obviously performance, that is not creating the same object over and over... maybe even state storage.

      in a world with infinite processing power and infinite ram, you probably wouldn't be using such things.

  30. 2 years ago
    Anonymous

    >freeCodeCamp
    they waste time like no one's business
    >900 hours before you can even touch front end dev

    • 2 years ago
      Anonymous

      Freecodecamp has some moderately challenging projects for you to complete.
      They force you to get off your ass and study what they're asking for.
      The questions on the other hand feel random and on serve to check if you watched a video by little timmy.

  31. 2 years ago
    Anonymous

    is freecodecamp a joke? like, I can kind of see how it could be funny to waste dozens of hours out of a bootcamper moron's life to explain CS 101 concepts but do people actually watch this shit? I literally saw a 35 hour solidity INTRODUCTION video posted by them, who the frick watches that shit?

  32. 2 years ago
    Anonymous

    [...]

    now you just need to define spain. in the end you're still using circular reference, just with some degree of separation before you get back to the france.
    also, you can not define a border precisely at all, even if you're not being pedantic about splitting atoms. the lines you see on a map are imaginary.

    • 2 years ago
      Anonymous

      Spain, second country from west to east on the European continent, having its own language that is used around the world, because of its historic role in colonisation of other civilisations/people.

      isn't that a more useful definition than "Spain is whatever the world deems as Spain?".

      • 2 years ago
        Anonymous

        I don't disagree that it's a more useful definition in day to day life, but even that is still ambiguous. "Europe" is not well defined either, we just arbitrarily cut off the super continent afro-eurasia into three pieces to make continents not be entirely meaningless. Some countries don't even recognize Europe at all, and just treat them as part of Eurasia. More commonly the same shit happens to the Americas, where pretty much anyone who isn't in north america counts the entire land mass as being a single thing.
        second country from west to east? if they conquered portugal would they stop being spain? does a country need to have its own language to be a country? Political things pretty much do just boil down to "whatever the world deems is x", which is why you don't consider indian reservations their own country. They speak their own language, they have their own separate history from the people around them, some reservations can be mostly self-sufficient, but they're not countries because the U.S. says "haha, tough luck" in UN meetings. similar stuff with taiwan / chinese taipei, and some minor countries that still aren't recognized by the U.N. but that can be recognized by other random members of the U.N.

  33. 2 years ago
    Anonymous

    You can point to a location on a map that is the region of France, and that region is its own country with its own distinct sociopolitical climate.

    You can't point at the word woman when its definition is "identifying as a woman" and then point at the word woman in the definition and then back at the definition in loop. That doesn't mean anything.

  34. 2 years ago
    Anonymous

    If you assume ram is just an array of bytes, a pointer is just the index into that array. Ex. int* tells you where in ram you can find an int type.

    Congrats, you're 80% there in 2 sentences.

  35. 2 years ago
    Anonymous

    MEMORY = GIANT ARRAY
    POINTER = ARRAY INDEX
    POINTER = ALSO INSIDE MEMORY
    NO POINTER = "LOCAL"/CLONE INTO
    SIMPLE = IF NOT Black person

  36. 2 years ago
    Anonymous

    this shit takes 30 mins max. my uni had precroded short vids mixed with coding exercises to teach us, ez af

    • 2 years ago
      Anonymous

      30 seconds you mean?
      like, how hard is it really to figure out that pointer just points somewhere?

  37. 2 years ago
    Anonymous

    You think 4 hours is a lot?
    You cant even read a book in 4 hours

  38. 2 years ago
    Anonymous

    [...]

    That's not how definitions work. You don't have to change definitions when the world changes. The definition is the one thing that *doesn't* change, that you use to keep track of the thing.
    If France's borders change because Basque gains independence, what process do you use to determine France's new geographical coordinates? That's your actual definition of France.

    You can point to a location on a map that is the region of France, and that region is its own country with its own distinct sociopolitical climate.

    You can't point at the word woman when its definition is "identifying as a woman" and then point at the word woman in the definition and then back at the definition in loop. That doesn't mean anything.

    You can point at the group of ~4 billion people that identify as women, just as you can point at the parts of the map that are identified as France.
    Maybe you shouldn't. But you can.

    >The borders that are just whatever various governments agree they are? The ones that are not grounded in material truth but in politics?
    >a political concept (country) is defined by politics
    the frick else were you expecting

    Yes, exactly. There's an effort to turn "woman" into a political concept. Maybe that's bad, but it's not nonsensical.

    >array of strings
    You only need one pointer to the first entry. 'Arrays of strings' is literally just n amount of characters laid out in contigous memory interspaced with newline characters. Zero reason for a double pointer. As for allocation, you just need to get the final address to the variable and then just chuck out the pointer to the pointer.

    What if I want O(1) access to the nth string? What if I want to embed newlines in my strings? What if I want to shorten or realloc() an individual string without having to move all the strings after that?
    Not even argv does this.

    • 2 years ago
      Anonymous

      You do realize that internally, you're not going to be getting O(1) with double pointers anyway, as you still need to search through the pointers to get the nth pointer to get the nth value you need. Same goes for everything else you mentioned, it's all abstracted away from you to give you the impression that less is happening then you really think is going on. You may THINK you're going to get O(1) or whatever with your code...but you're really not.

      • 2 years ago
        Anonymous

        Oh yeah I missed that. So you think indexing an array performs a search somehow in the background? I suppose you're also the kid who thinks reallocing a single buffer in a staggered array causes all the other buffers to be realloced.

    • 2 years ago
      Anonymous

      >Not even argv does this.
      Or rather, it provides an array of pointers as the preferred interface. It does put the arguments in adjacent null-delimited strings.

      You do realize that internally, you're not going to be getting O(1) with double pointers anyway, as you still need to search through the pointers to get the nth pointer to get the nth value you need. Same goes for everything else you mentioned, it's all abstracted away from you to give you the impression that less is happening then you really think is going on. You may THINK you're going to get O(1) or whatever with your code...but you're really not.

      What do you mean? Indexing an array doesn't search through all values. It just calculates a memory address and loads from it. Maybe there's some complicated cache reason that it's not true O(1), but close enough.
      A linear search will be O(n) no matter what, but not everything is a linear search.

  39. 2 years ago
    Anonymous

    If you can't understand pointers you have no business programming anything in any language.

  40. 2 years ago
    Anonymous

    >4h
    lol, yeah, you will need much more to git gud in C++, and pointers are one of the easier things. just give it up kid.

  41. 2 years ago
    Anonymous

    Here are two arrays:
    uint8_t source[16] = { /* some initialization values here */ };
    uint8_t destination[16];

    Which line of code is correct and copies the values?
    memcpy(destination, source, sizeof(source));
    memcpy(&destination, source, sizeof(source));
    memcpy(&destination[0], source, sizeof(source));
    memcpy(destination, &source, sizeof(source));
    memcpy(&destination, &source, sizeof(source));
    memcpy(&destination[0], &source, sizeof(source));
    memcpy(destination, &source[0], sizeof(source));
    memcpy(&destination, &source[0], sizeof(source));
    memcpy(&destination[0], &source[0], sizeof(source));

    People who claim "pointers are easy" haven't seen anything in the wild yet.

    • 2 years ago
      Anonymous

      all of them are correct homie

      • 2 years ago
        Anonymous

        All will work?

        Yes. But have you tried them or did you actually understand why?
        Can you explain it?

        Then here is another one:
        send(to, from, count)
        register short *to, *from;
        register count;
        {
        register n = (count + 7) / 8;
        switch (count % 8) {
        case 0: do { *to = *from++;
        case 7: *to = *from++;
        case 6: *to = *from++;
        case 5: *to = *from++;
        case 4: *to = *from++;
        case 3: *to = *from++;
        case 2: *to = *from++;
        case 1: *to = *from++;
        } while (--n > 0);
        }
        }

        Easy, huh?

        • 2 years ago
          Anonymous

          The confusing part of this isn't the pointers, it's the loop unrolling and the unconventional use of case labels.

        • 2 years ago
          Anonymous

          Duff's device. What makes it complex are not pointers, but fricked up switch statement syntax.

    • 2 years ago
      Anonymous

      All will work?

    • 2 years ago
      Anonymous

      This has nothing to do with pointers. It's because of weak typing in C and array decay and void* conversion.

      [...]

      Yes. But have you tried them or did you actually understand why?
      Can you explain it?

      Then here is another one:
      send(to, from, count)
      register short *to, *from;
      register count;
      {
      register n = (count + 7) / 8;
      switch (count % 8) {
      case 0: do { *to = *from++;
      case 7: *to = *from++;
      case 6: *to = *from++;
      case 5: *to = *from++;
      case 4: *to = *from++;
      case 3: *to = *from++;
      case 2: *to = *from++;
      case 1: *to = *from++;
      } while (--n > 0);
      }
      }

      Easy, huh?

      This also doesn't have anything to do with pointers. C control structures are just gotos in disguise instead of structured blocks.

  42. 2 years ago
    Anonymous

    The hard part is not understanding pointers, it's to know all the UB cases you might get by using them.

  43. 2 years ago
    Anonymous

    [...]

    alright then why are you here? go to reddit, Black person.

  44. 2 years ago
    Anonymous

    pointers point,
    they're like a stack of memory addresses, or something

  45. 2 years ago
    Anonymous

    [...]

    and you'll take your tourist ass leave right? didn't think so

  46. 2 years ago
    Anonymous

    [...]

    >my homosexual schizo board get more bot post than others so I'm right!
    anime website

  47. 2 years ago
    Anonymous

    [...]

    [...]

    Black person

    • 2 years ago
      Anonymous

      OMG :333 Don't be so rude anon san!!! ^__^

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