DEV Community

Md Rasheduzzaman
Md Rasheduzzaman

Posted on

<bits/stdc++.h> in C++

It is basically a header file that includes every standard library.

People do focus more on finding the algorithm to solve a problem than on software engineering.

𝘼𝙙𝙫𝙖𝙣𝙩𝙖𝙜𝙚𝙨 𝙤𝙛 𝙗𝙞𝙩𝙨/𝙨𝙩𝙙 𝙞𝙣 𝙘++

✔ In contests, using this file is a good idea, when you want to reduce the time wasted doing chores; especially when your rank is time sensitive.

✔ This also reduces all the chores of writing all the necessary header files.

✔ You don’t have to remember all the STL of GNU C++ for every function you use.

𝘿𝙞𝙨𝙖𝙙𝙫𝙖𝙣𝙩𝙖𝙜𝙚𝙨 𝙤𝙛 𝙗𝙞𝙩𝙨/𝙨𝙩𝙙 𝙞𝙣 𝘾++

✘ bits/stdc++.h is a non-standard header file of GNU C++ library. So, if you try to compile your code with some compiler other than GCC it might fail.

✘ Using it would include a lot of unnecessary stuff and increase compilation time.

✘ This header file is not part of the C++ standard and is, therefore, non-portable, and should be avoided.

Read related articles:
What is the difference between C and C++?

Top comments (0)