bkrtoni's blog

By bkrtoni, history, 8 years ago, In English

We all know stdc++.h lib that includes all libs in c++ But we can't use it in visual studio so i know a way to use it in visual studio , and this may help any one using VS and want to use stdc++.h

First thing

Download stdc++.h lib this is a link to download the file

Download link

Second thing

Copy the stdc++.h file Go to DIR C:\Program Files\Microsoft Visual Studio 12.0\VC\include\ Create new folder here and name it bits then paste stdc++.h inside the folder

Last thing

Open VS , make c++ project and try the Lib #include<bits/stdc++.h>

and that is everything I hope that will help you :)

  • Vote: I like it
  • +20
  • Vote: I do not like it

| Write comment?
»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

still, the compiler does not recognize the library after following above steps

  • »
    »
    7 years ago, # ^ |
    Rev. 3   Vote: I like it +5 Vote: I do not like it

    It worked for me. Make sure you are putting the header file in a "bits" folder inside a Visual Studio Include directory (for newer versions of Visual Studio, this is stored in the INCLUDE environment variable... you can type echo %INCLUDE% in a command prompt to view it).

»
7 years ago, # |
Rev. 2   Vote: I like it -8 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

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

The console terminates immediately after printing output. How to stop it like Codeblocks console ?

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    CTRL+F5 or use this function system('pause');

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

bits work but I will be happy if we find a way to use #include <ext/pb_ds/assoc_container.hpp>

include <ext/pb_ds/tree_policy.hpp> and all header files in vs so that I can use ordered set in it. I hope my question is clear.

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

download link doesn't work