Inspired by Zekes passionate blogging here, I decided to write a blog. On a topic that I think deserves a bit of thought... *drumroll* Casting in C++.
Oh yeah. It's pretty, eh?
If coming from a C background you are likely to have a face expression similar to this:Code:const int i = 10; char* c = reinterpret_cast<char*>(const_cast<int*>(&i));- longing for your good old
And I can honestly understand why people despiseCode:char* c = (char*)&i;
Life has been a pain in the a$$ lately. Literally. The only chair I used at my desk and computer was an old, stiff kitchen chair. Ouch. Today, though, I went to a furniture shop. I am sure I had a weird look on my face coming out of there, as I had just bought the most expensive office chair the shop had to offer...
That probably makes me sound rich, right? Wrong. I am now broke (more or less). Anyway, I realized how much your chair means to you as a computer user. Playing video