DessertKid's blog

By DessertKid, history, 8 years ago, In English

I've seen many people writing many header files explicitly and not using bits/stdc++.h. Does using bits/stdc++.h have any disadvantages?

  • Vote: I like it
  • +50
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
Rev. 2   Vote: I like it +56 Vote: I do not like it

It works in GCC only and there are probably no guarantees that it will still work in the future. It also slows down compilation as compiler has to process much more files (unless you use it as intended — as a precompiled header, see below). There are several other downsides, they all sum up to "it's unacceptable in production code".

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

That people, as I think, use XCode (IDE) on MacOS. It IDE hasnt <bits/stdc++.h> header. P.S. it just my hypothesis and sorry for my ENG.

»
8 years ago, # |
  Vote: I like it +8 Vote: I do not like it

People who code in visual studio don't use it because it doesn't work there. Other reasons:

  1. It slows down compilation time(doesn't affect execution time though)

  2. On few OJs, Variable name y1 doesn't work with it. Example How to avoid it

»
5 years ago, # |
  Vote: I like it -11 Vote: I do not like it

It's hard to memorize?

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

A Noob like me sometimes write #include<bits\stdc++.h> And then it's hard to debug the error...

Ps: I don't do this now.. but it happened to me once.