最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

C++無法打開源文件bits/stdc++.h的問題

 更新時間:2023年08月04日 10:12:48   作者:Lv.Twelve.  
這篇文章主要介紹了C++無法打開源文件bits/stdc++.h的問題以及解決方案,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教

VS 是不支持 萬能頭的,需要我們自己去手動添加。

原理

首先我們得知道萬能頭是個啥東西。(其實是我不知道。。QAQ)<bits/stdc++.h> 其實就是一個頭文件,里面包含了幾乎所有的C++庫里的頭文件

因此一般只需要包含這一個頭文件就能滿足所有的需求。

不過自然也會有著一些缺點。

優(yōu)點

  • 簡單便捷。能滿足大多數(shù)場合,即一些對運行需求不大嚴(yán)格的場合。
  • 節(jié)省時間,不必考慮需要加入哪些頭文件。這對參與競賽的時候能起到一點幫助。

缺點

  • 包含所有的頭文件,編譯時速度自然就稍慢一些,增加編譯時間。
  • 這不是C++的標(biāo)準(zhǔn)庫,因而不是所有的編譯系統(tǒng)都有,比如一些OJ就可能沒有。
  • 不建議新手使用,新手還是要多用用庫文件,才知道那些標(biāo)準(zhǔn)庫里都有啥。

VS添加<bits/stdc++.h>

首先我們需要新建一個文件夾bits,然后創(chuàng)建一個頭文件stdc++.h。

頭文件內(nèi)容即是萬能頭里的實質(zhì)內(nèi)容。

文件內(nèi)容

// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2017 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
// <http://www.gnu.org/licenses/>.
/** @file stdc++.h
 *  This is an implementation file for a precompiled header.
 */
// 17.4.1.2 Headers
// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

隨后我們需要將這個文件夾加入到VS的環(huán)境變量中,為了便于頭文件的管理,此處我們把這個文件夾跟VS其余頭文件放到一起。

便捷操作

首先輸入#include<iostream>

右鍵 – 打開文檔

右鍵 – 打開文件所在位置

復(fù)制文件夾進(jìn)去即可。

其中的路徑大家可以參考下。

至此就完成了。

總結(jié)

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • c++ vector造成的內(nèi)存泄漏問題

    c++ vector造成的內(nèi)存泄漏問題

    這篇文章主要介紹了c++ vector造成的內(nèi)存泄漏問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2023-08-08
  • C++中String增刪查改模擬實現(xiàn)方法舉例

    C++中String增刪查改模擬實現(xiàn)方法舉例

    這篇文章主要給大家介紹了關(guān)于C++中String增刪查改模擬實現(xiàn)方法的相關(guān)資料,String是C++中的重要類型,程序員在C++面試中經(jīng)常會遇到關(guān)于String的細(xì)節(jié)問題,甚至要求當(dāng)場實現(xiàn)這個類,需要的朋友可以參考下
    2023-11-11
  • 使用c++實現(xiàn)OpenCV繪制圓端矩形

    使用c++實現(xiàn)OpenCV繪制圓端矩形

    這篇文章主要介紹了使用c++實現(xiàn)OpenCV繪制圓端矩形,其中著重的講解了OpenCV使用過程中需要注意的一些小細(xì)節(jié),避免浪費大家在開發(fā)過程中浪費多余的時間
    2021-08-08
  • C++零基礎(chǔ)精通數(shù)據(jù)結(jié)構(gòu)之帶頭雙向循環(huán)鏈表

    C++零基礎(chǔ)精通數(shù)據(jù)結(jié)構(gòu)之帶頭雙向循環(huán)鏈表

    帶頭雙向循環(huán)鏈表:結(jié)構(gòu)最復(fù)雜,一般用在單獨存儲數(shù)據(jù)。實際中使用的鏈表數(shù)據(jù)結(jié)構(gòu),都是帶頭雙向循環(huán)鏈表。另外這個結(jié)構(gòu)雖然結(jié)構(gòu)復(fù)雜,但是使用代碼實現(xiàn)以后會發(fā)現(xiàn)結(jié)構(gòu)會帶來很多優(yōu)勢,實現(xiàn)反而簡單
    2022-03-03
  • Qt的QJsonObject存儲QByteArray的方法實現(xiàn)

    Qt的QJsonObject存儲QByteArray的方法實現(xiàn)

    本文主要介紹了Qt的QJsonObject存儲QByteArray的方法實現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2026-02-02
  • visual studio 2022中的scanf問題解決

    visual studio 2022中的scanf問題解決

    昨天在使用Visual Studio 2022編寫C語言程序時遇到了scanf問題,對于vs的編譯器來說scanf是不安全的,編譯器通過不了scanf,本文就來介紹一下解決方法,感興趣的可以了解一下
    2023-12-12
  • C++實現(xiàn)LeetCode(126.詞語階梯之二)

    C++實現(xiàn)LeetCode(126.詞語階梯之二)

    這篇文章主要介紹了C++實現(xiàn)LeetCode(126.詞語階梯之二),本篇文章通過簡要的案例,講解了該項技術(shù)的了解與使用,以下就是詳細(xì)內(nèi)容,需要的朋友可以參考下
    2021-07-07
  • C語言常用庫函數(shù)的使用及模擬實現(xiàn)詳解例舉

    C語言常用庫函數(shù)的使用及模擬實現(xiàn)詳解例舉

    C語言庫函數(shù)是把自定義函數(shù)放到庫里,是別人把一些常用到的函數(shù)編完放到一個文件里,供程序員使用,下面讓我們一起來詳細(xì)了解它
    2022-04-04
  • C++中基類和派生類之間的轉(zhuǎn)換實例教程

    C++中基類和派生類之間的轉(zhuǎn)換實例教程

    這篇文章主要介紹了C++中基類和派生類之間的轉(zhuǎn)換,有助于深入理解C++面向?qū)ο蟪绦蛟O(shè)計,需要的朋友可以參考下
    2014-08-08
  • C++ Strassen算法代碼的實現(xiàn)

    C++ Strassen算法代碼的實現(xiàn)

    這篇文章主要介紹了C++ Strassen算法代碼的實現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-03-03

最新評論

门源| 高阳县| 湘西| 安图县| 海晏县| 南靖县| 贵阳市| 安陆市| 博白县| 白朗县| 白银市| 乐清市| 菏泽市| 毕节市| 陆良县| 会东县| 琼结县| 岐山县| 昭苏县| 汉阴县| 博客| 景谷| 白沙| 郯城县| 南阳市| 石台县| 吴堡县| 淮南市| 永和县| 区。| 蓬溪县| 安泽县| 碌曲县| 万宁市| 泰兴市| 报价| 宜宾县| 博客| 汕尾市| 集安市| 诏安县|