Daily Archives: October 7, 2021

bits/stdc++.h

https://stackoverflow.com/questions/25311011/how-does-include-bits-stdc-h-work-in-c 有時候會看到一些範例使用 特別是在一些competitive programming中使用到,這個header基本上就是把所有的C++ header include進來,不用再特別去個別include 也可參考 https://gcc.gnu.org/onlinedocs/gcc-4.8.5/libstdc++/api/a01235_source.html 看起來省了好多include header的工,不過需要注意的是,這個header不是standard,所以使用上可能會有portable的issue 另可參考 https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h 這邊提出了一些pros and cons

Posted in C++ Language | Leave a comment