Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I include <bits/stdc++> in Xcode

Tags:

c++

xcode

macos

I have tried to include the header file bits/stdc++ in my C++ code, but it seems the compiler doesn't support it. Is there any way to make it work?

I use OS X Yosemite 10.10.2 and Xcode 6.1.1.

like image 341
Omar Avatar asked Mar 11 '15 18:03

Omar


People also ask

Why bits Stdc ++ H is not working?

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; e.g. MSVC do not have this header. Using it would include a lot of unnecessary stuff and increases compilation time.

Why we use #include bits Stdc ++ H?

#include <bits/stdc++. h> is an implementation file for a precompiled header. But in contests, using this file is a good idea, when you want to reduce the time wasted in doing chores; especially when your rank is time-sensitive.


1 Answers

You can do it by copying stdc++.h file from here: https://gist.github.com/reza-ryte-club/97c39f35dab0c45a5d924dd9e50c445f

Then you can include the file in your c++ file like this:

 //suppose the file is in your home folder, here my username is reza  #include "/Users/reza/stdc++.h" 
like image 86
Reza Avatar answered Sep 28 '22 05:09

Reza