r/shittyprogramming • u/elSenorMaquina • Aug 18 '20
This is how I do includes.
Seriously guys, it's time to stop all the "Did I include this?" "Did I include that?" that comes with every project ever.
Just make a single file on your disk named "everything.h" and throw inside all the include statements you will ever need. All your stdios, stdlibs and the whole thing in one neat place!
Then, you just include everything.h in your source files and you are good to go.
Really, it´s the best way to do it. It's how us, REAL™ programmers, do it. Anyone telling you not to do it is probably a Microsoft simp or something like that.
76
u/schwester_ratched Aug 18 '20
find / -name '*.h' >> everything.h
23
u/awesome2fun Aug 19 '20
include <bits/stdc++>
18
u/[deleted] Aug 18 '20 edited Aug 19 '20
Heh, it works on my machine, it not compiling on yours isn't my problem.
/s
I love build servers, we have a check-in rule at work and if your code won't compile on the build server the check-in is rejected. And if your code's not checked in your task is not complete. So if it's not building off your machine, you fail.
9
u/BertRenolds Aug 18 '20
What about multiple versions
1
u/Poddster Aug 19 '20
At least precompiled headers might have a chance of working this way