Since, bits/stdc++ is a GNU GCC extension, whereas OSX uses the clang compiler.
You have to create bits directory inside /usr/local/include and then make a header file stdc++.h inside bits and paste the contents of this gist(gist.github.com/sachin-kmr/ee03a0d...) inside it. Then, it should compile as expected.
Since, /usr directory is hidden by default on Mac OSX.
Open Finder.
Click Go on menu bar then click Go to folder or Press Command+Shift+G directly.
Enter the path /usr/local/include
Now proceed as mentioned above.
(UPDATE: For latest OS X you need to make folder include inside local and make bits folder inside include folder and then copy paste the code inside bits folder.)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, checkout this solution. It worked for me
stackoverflow.com/a/40935471/13556971
Since, bits/stdc++ is a GNU GCC extension, whereas OSX uses the clang compiler.
You have to create bits directory inside /usr/local/include and then make a header file stdc++.h inside bits and paste the contents of this gist(gist.github.com/sachin-kmr/ee03a0d...) inside it. Then, it should compile as expected.
Since, /usr directory is hidden by default on Mac OSX.