0

I am trying to get #include<bits/stdc++.h> to work. I am using it as other headers like #include , but I am not having success.

Code:

#include<bits/stdc++.h>
using namespace std;

Error:

Matrix.cpp:1:9: fatal error: 'bits/stdc++.h' file not found
#include<bits/stdc++.h>
  • 4
    Please see ["Why should I not #include ?"](https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h). – G.M. Apr 07 '22 at 20:38
  • 1
    Heads up: `` is an internal GCC header and therefore will only work with that compiler. – Etienne de Martel Apr 07 '22 at 20:39
  • 4
    Yeah, don't use it in the first place. – WhozCraig Apr 07 '22 at 20:42
  • TL;DR - you cannot. It only works with one specific compiler that chose to have such file for some reason. But the good news is, you shouldn't use it anyway. Better only `#include` what you need. – Yksisarvinen Apr 07 '22 at 21:50
  • @Yksisarvinen That some reason being to make it possible to generate a 'one size fits all' precompiled header, I believe. – Paul Sanders Apr 07 '22 at 22:40

0 Answers0