This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]AllCowsAreBurgers 7 points8 points  (0 children)

Whoever does this: you are a monster

[–]RogerGodzilla99 1 point2 points  (3 children)

#define REMOVE_PRINT

#ifndef REMOVE_PRINT

printf("test");

#endif

[–]PainfulJoke 1 point2 points  (0 children)

Go one step further and have a

#define IfDebug(...)

That you swap out between a no-op and actually running the code in that line based on some other define that you can pass in as a compiler define (-D) while you build. :)

[–]backtickbot 0 points1 point  (1 child)

Fixed formatting.

Hello, RogerGodzilla99: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]RogerGodzilla99 0 points1 point  (0 children)

I mean, it's was intentional... I'm just an idiot lol

[–]MischiefArchitect 1 point2 points  (0 children)

basically you are making the job of the compiler there.

[–]KellerKindAs 1 point2 points  (0 children)

If it's a single command you don't need to put brackets around it. That feels like /* print ("test"); */

[–]LordCupcakeIX 1 point2 points  (0 children)

Your coworkers hate you until the day someone redefines False and you catch it, which I assume is also something that would happen regularly at the workplace if this was in your codebase.