Tensor's blog

By Tensor, 7 years ago, In English
  • This is just a method i used to make me able to include bits/stdc++.h
  • in visual c++.
  • for those had minGW installed on PC :
  • C:\MinGW\mingw32\lib\gcc\mingw32\4.8.1\include\c++\mingw32\bits
  • copy this folder and then go to this adress
  • C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include
  • paste your folder. go to your visual studio project type bits you will see
  • the auto-complete for the library and then choose stdc++.h
  • for those don't have minGW:
  • you should write your own header file and include all libraries in it then
  • go to C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include
  • make new folder name it "bits" and name the header file stdc++.h
  • then paste it in "bits" folder.
  • Hope this helps!
  • Happy coding
 
 
 
 
  • Vote: I like it
  • +28
  • Vote: I do not like it

»
7 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Thank you very much (1+from me)

»
7 years ago, # |
  Vote: I like it +8 Vote: I do not like it

so clever you are! Thank you!

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

u can download the bits folder here

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

for Visual studio 2017 users .. you can add bits folder to this path:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.10.25017\include

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

My biggest thanks!!

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks a lot, from all the students of Moscow University ACM group!

»
2 years ago, # |
  Vote: I like it -16 Vote: I do not like it

thanks a lot.

»
20 months ago, # |
  Vote: I like it -8 Vote: I do not like it

Thanks you

»
17 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks and here's another solution. Just include the <__msvc_all_public_headers.hpp> in Visual Studio has the same effect as including <bits/stdc++.h> in GCC or MinGW.

»
16 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Thank you very much <3

»
14 months ago, # |
  Vote: I like it 0 Vote: I do not like it

hi budu

»
12 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Sorry if my question seems irrelevant.I cannot use include bits/stdc++.h in visual studio code editor.Do u have any fix for that?

»
12 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks for that!

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

for Microsoft Visual Studio Professional, you can try to add folder bits to path: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

With latest MinGW default installation, I found the folder at C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++\mingw32\bits

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

thanks you are the best****

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Any idea how to do this for Microsoft VS Code?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    just watch on youtube vs setup for cp there is full tutorial ...

    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Okay i found out, on the internet its not explained straight forward anywhere, but here is what worked out for me (hopefully this will save someones time).

      First one has to download the stdc++.h file, or you could alternatively copy it from the mingw folder if you have mingw, its path should be: C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\x86_64-w64-mingw32\bits

      When you locate it, copy it to the Visual Studio code "include" library Its path is C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC[some number]\include\bits The bits folder might not be there, in that case just create it yourself and put the stdc++.h file inside the new folder.

      That did it for me.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How about codeblocks, where can I add the stdc++.h to? Thanks