Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the steps to manually add bits/stdc++.h to vs2017

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces you how to manually add bits/stdc++.h to vs2017, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Native environment: win10 system 64-bit vs2017

Recently, I accidentally found the header file bits/stdc++.h (universal header file) in the code. Basically, as long as all the code uses this header file, it will not write any other header files.

Seeing it is like opening up a new world (there is also a drawback, which leads to slower compilation, but is generally negligible).

[if you have installed MinGW, find the bits folder directly in the folder, copy and paste the contents into the header file library of vs]

1. Create a new txt document and copy the following code (stdc++.h source code) into it:

/ / C++ includes used for precompiling-*-C++-*-/ Copyright (C) 2003-2015 Free Software Foundation, Inc.//// This file is part of the GNU ISO C++ Library. This library is free// software; you can redistribute it and/or modify it under the// terms of the GNU General Public License as published by the// Free Software Foundation; either version 3, or (at your option) / / any later version. / / This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details. / / Under Section 7 of GPL version 3, you are granted additional// permissions described in the GCC Runtime Library Exception, version// 3.1, as published by the Free Software Foundation. / / You should have received a copy of the GNU General Public License and// a copy of the GCC Runtime Library Exception along with this program;// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see//. / * * @ file stdc++.h * This is an implementation file for a precompiled header. * / / 17.4.1.2 Headers / / C#ifndef _ GLIBCXX_NO_ASSERT#include # endif#include # if _ cplusplus > = 201103L#include # endif / / C++#include # include Include # if _ cplusplus > = 201103L#include # include

two。 Rename the txt document to stdc++.h

3. Open the installation directory of vs2017

C:\ Program Files (x86)\ Microsoft Visual Studio\ 2017\ Community\ VC\ Tools\ MSVC\ 14.16.27023\ include format similar to the above

Create a new folder "bits" under the "include" directory, and then move the bits/stdc++.h into.

4. The great task has been completed

On how to manually add bits/stdc++.h to vs2017 steps is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report