1. Follow my worthless and random Twitter account »

    I wanna beat my friend, so get your ass over there and press that lil’ button please.

  2. I recently traveled to Berlin with some other guys from school for an EU project. Definitely one of the best experiences in my life so far. Here’s some random pics I took during the week.

  3. What songs should I remove?

    I was going to upload a new track to Soundcloud, but unfortunately I’m all out of minutes. So, I gotta delete a couple of tracks there. But what songs should I remove?

    Please check out my Soundcloud-page here and hit me up with a couple of suggestions, it would be very much appreciated!

  4. “The internet knows more about you than your own mother does.”

    – Jonathan Nylén

    (Source: whyme187)

  5. Sedition Theory's Twitter »

    Sedition Theory just joined Twitter. Follow them to know when it all happens, aight?

  6. Refreshments

    I edited my theme a little bit to make it more bright and useful. The old one was a bit heavy as the background weighted in at 1,8MB (what was I thinking). So there is no background any longer. Also (finally) implented infinite scrolling, since paged websites is so 2010.

    Hope you like the new looks, if you run across any bugs or so just leave me a comment.

  7. How pointers work

    joqueneth:

    Pointers are pretty simple; be careful not to overcomplicate them in your head. Before I introduce the C syntax for them, let me just talk about the abstract idea going on first.

    So let’s say you’ve got something in memory somewhere. Say you’ve got a huge struct with 900 long long integers, which takes up 7200 bytes in memory. That struct has an address, which is just 8 bytes (I’m assuming 64-bit architecture here; it’s 4 bytes for 32-bit) of memory. Wouldn’t it be useful if you could store that address somewhere? For example, you could tell that address to your friends, and they can go find and access your struct without you having to pass the whole thing to them. (You can relate this to street addresses and houses, if you want a better concrete analogy.) That’s all pointers are. That’s it. The entire concept is that simple. Pointers are addresses to other things.

    Now for the C syntax, to put the above idea in line with what everyone else says: There are three operations related to pointers that you have to know. The first is how to declare a pointer. You declare a pointer (“a” is the pointer here) to an integer like this:

    int *a;

    The second is to assign an address to a pointer. How do you get the address of a variable in C? The ampersand. Say you have an integer x already declared. You can assign the address of x (an integer) to a (a pointer to an integer) with this line:

    a = &x;

    The last is to dereference a pointer. This is the step your friends take between you giving them an address and them doing stuff with it. They have to go from the address to the struct itself somehow, right? That’s all dereferencing is. Going from an address to the stuff at that address. You dereference things in C with the asterisk:

    x + (*a); // The value of this is 2*x

    That’s it for the C syntax related to pointers. I’m not going to go into what all pointers are useful for (the example I first gave, where you’re passing data around to friends, is one thing, where your friends are other functions in a program), but hopefully I’ve given you enough of a foundation that your professor/book/whatever can take it from there.

    If you’re struggling on how to learn pointers and understand why they’re actually needed, I’d say that this is an excellent explanation (as it actually made me understand how pointers work). I’m assuming that this applies to C++ as well, as it’s using the same syntax.

    Thanks for taking the time writing this useful post, it was very informative and I bet it’s useful for a lot of other programming noobs out there like me.

    (Source: etzolin)

  8. How does pointers work?

    I don’t get how pointers work (programming), and it feels like I’m never going to. If someone could answer me this in an understandable way I will be forever grateful.

  9. Dehumanizing »

    Check out my friend’s blog, he sure deserves it.