The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Browse by Tags

All Tags » c++ (RSS)
  • try-catch everywhere!

    hey folks, i've been reading TDWTF for a few years now... and i really hope this won't make my code end up here someday. that's why i'm asking. is encasing every single bit of loading in try-catch and logging any catches a wtf, or just good practise? i'm asking this because i'm...
    Posted to Forum by Dekker3D on 11-05-2008
  • Re: Visual Studio is pissing me off...

    [quote user="LordLiverpool"]Erm, well in Visual Studio 6.0 (that's 1998, people), Intellisense worked perfectly well.[/quote] C++ didn't , however. Maybe the additional complexity introduced since then crippled Intellisense? Then again, maybe not.
    Posted to Forum by Spectre on 10-21-2008
  • Re: 500 KB saved is 500 KB earned

    Hint: your selected forum editor interprets <something> as an HTML tag, and promptly deletes it. This tends to make code, such as yours, invalid.
    Posted to Forum by Spectre on 10-08-2008
  • 500 KB saved is 500 KB earned

    Now that's not really a wtf. That's actually a pretty clever way of reducing memory allocation calls, which, for a game, is very useful. Now reviewing some code from the other team (which I thought we might reuse for our project) I bumped into this: It's a code for a class height_map that...
    Posted to Forum by wraith on 10-08-2008
  • Re: Notepad++ god damned exception

    TRWTF is that it catches int . Okay, I admit that I threw a bool once, but it was in a solely personal program!
    Posted to Forum by Spectre on 09-11-2008
  • Re: Doing it Wrong: Unions

    Putting something inside union is the idiom to show that you never expect that something to grow constructors or destructors. I can see two wtfs: 1) You didn't know the idiom. 2) They didn't explain the idiom well enough when you asked about it.
    Posted to Forum by Fister on 08-27-2008
  • Re: Figure this piece of code out

    Overloading operators doesn't affect precedence. Oh, and the indentation is all messed up. Is it like this in the original code?
    Posted to Forum by Spectre on 07-03-2008
  • Re: C Code Creep

    [quote user="Spikeles"] Because, on some architectures, char is not 1 byte in size. [/quote] That's false. [quote user="C99, 6.5.3.4(3)"] When [sizeof is] applied to an operand that has type char, unsigned char, or signed char, (or a qualified version thereof) the result is 1...
    Posted to Forum by Spectre on 06-13-2008
  • Re: Two windows active at once?

    [quote user="lolwtf"][quote user="Spectre"]My sarcasm detector might be broken, but how's that , for example, useless?[/quote]Now that's the real WTF. Conflicts with the STL? How the fuck does that make it to production?[/quote] Remember, C++ was standartized in 1998, and...
    Posted to Forum by Spectre on 04-07-2008
  • C++ & Pain

    So I've had the pleasure of taking over a rather large codebase and have to share some of the pain that I am experiencing or I'm going to go nuts. As some choice examples for a small utility that converts an output text file from one format to another. ls -l on the directory reveals: total 20...
    Posted to Forum by WristMan on 03-28-2008
Page 1 of 5 (41 items) 1 2 3 4 5 Next >
Powered by Community Server (Non-Commercial Edition), by Telligent Systems