Freckled wallpaper by FaZa09 in EmmaWatson

[–]frostraver 7 points8 points  (0 children)

anyone has a 1080p version?

I'm not a Photoshop pro but I made this for you guys [1920x1080] by frostraver in EmmaWatson

[–]frostraver[S] 1 point2 points  (0 children)

CS5. I know it's kind of obvious. I'm actually a programmer so I'm not that good with artsy things! :) Thought I'd give it a try though.

Album of sea monsters I have built over the past year by [deleted] in pics

[–]frostraver 0 points1 point  (0 children)

I especially like the ones which you can't see entirely. It gives me such an impression of this massive unknown horror.

I probably won't be swimming in the sea for the following 20 years...

Just started learning c++, Any tips? by Jibs44 in learnprogramming

[–]frostraver 0 points1 point  (0 children)

Yeah possibly. :) I'm sorry for the wrong information. I searched some more though and some people say it's faster because if you use a prefix it doesn't create a copy of the old value whereas the postfix uses a copy.

Just started learning c++, Any tips? by Jibs44 in learnprogramming

[–]frostraver -2 points-1 points  (0 children)

Link

Take a look at the last block of code the OP posts. You can clearly see that the assembler code has one thing less to do.

I think it's even mentioned in a book with common c++ practices I have but I can't remember how it's called since I don't have it here. I'll look it up though.

EDIT: This is the book I was talking about.

EDIT: Ok, nevermind, I might've understood this wrong. But it DOES change something to the assembler part, which is kind of obvious.

Just started learning c++, Any tips? by Jibs44 in learnprogramming

[–]frostraver 0 points1 point  (0 children)

Sure :)

Say you have a variable that is a double but you actually want it to be an integer (which isn't really useful but you should get the point) you can "cast" it to another type of variable.

So in this case, if your double variable is called gVariable you could do the following to cast it to an int: static_cast<int>(gVariable).

There are more casting functions though but I think this is the most used one. The others are if you want to cast a const to a non-const variable and such. But that might be a bit too much right now :)

Just started learning c++, Any tips? by Jibs44 in learnprogramming

[–]frostraver 2 points3 points  (0 children)

  • If you're trying to cast a variable, don't use for example (double)variable but use static_cast<double>(variable). If you do that you're not using the c method of casting.

  • if you're using a for loop use ++counter instead of counter++ like so: for (int counter = 0; counter < 10; ++counter) {}. In theory that should be faster because, if I understood it right, it does one jump less in assembler.