Блог пользователя bkrtoni

Автор bkrtoni, история, 8 лет назад, По-английски

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 :)

  • Проголосовать: нравится
  • +20
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    6 лет назад, # ^ |
    Rev. 3   Проголосовать: нравится +5 Проголосовать: не нравится

    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).

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится -8 Проголосовать: не нравится

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

»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

download link doesn't work