序文
vs2019でのC ++ユニバーサルライブラリヘッダーファイルのインストール
1. C ++ユニバーサルライブラリとは何ですか?
1. C ++ユニバーサルライブラリの定義:要するに、1つのステートメントが、現在C ++に含まれているすべてのヘッダーファイルを含む複数のステートメントを置き換えます。
2. C ++ユニバーサルライブラリの書き込み方法:#include <bits / stdc ++。h>
2. C ++ユニバーサルライブラリの内容:
以下は、bits / stdc ++。hに含まれるすべての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
3. C ++ユニバーサルライブラリをvs2019にインポートする方法:
1.最初:デスクトップに新しいテキストファイルを作成します;
2番目:(2)のコードをテキストファイルにコピーし、保存して終了します;
最後に名前をstdc ++。hに変更します
2.コンピューター内のvsのファイルの場所を見つけます
。VCの下のインクルードフォルダーを見つけます。ローカルパスD:\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.28.29333 \ include
3.インクルードフォルダーに新しいフォルダーを作成し、ビットに名前を付けます
4.ビットフォルダに入り、以前に作成したstdc ++。hをこのフォルダにコピーします
第4に、インクルードフォルダーを見つける方法:
特殊なケース:ファイルが見つからない場合は、
1)vsを右クリックしてファイルの場所を開き、上に移動してCommunityフォルダーに戻ります。
2)検索ボックスに移動して検索します:cliext
3)同じ:ファイルを右クリックして、インクルードフォルダーであるファイルの場所を開きます。
5.vs2019でユニバーサルライブラリを使用します。
インストールが成功したことを確認するためのコードブロック:
#include <bits/stdc++.h>
using namespace std;
void solve() {
cout << "Hello World!\n";
}
int main() {
solve();
return 0;
}
演算結果:
第六に、ユニバーサルライブラリについて話します。
ユニバーサルC ++ライブラリの長所と短所は、両刃の剣です。
リー:
1)ユニバーサルC ++ライブラリは簡単です
。2)ユニバーサルC ++ライブラリを使用すると、時間を節約するために他のヘッダーファイルをインポートする必要がありません。 ;
3)一部のゲームでは、C ++ユニバーサルライブラリを使用できるため、ゲーム時間を節約できます;
4)インポートしたライブラリが少ないかどうかを考慮する必要はありません;
5)コードは見栄えがよく、多くのライブラリがありますインポートヘッダーファイルが少なくなります。
短所:
1)進行に貢献しない、徐々に彼に依存し、いくつかのヘッダーファイルにつながる、忘れてしまいます;
2)ファイルを作成するときにいくつかのライブラリと比較して、これらをコンパイルするだけで済みますただし、C ++ユニバーサルライブラリはすべてのヘッダーファイルをコンパイルする必要があります。これにより、コンパイル時間が長くなりますが、これは私たちが見たくないことです
。3)ゲームでは、TLE(時間制限)が発生しやすいです。超過)、つまりタイムアウト。
総括する
C ++ユニバーサルライブラリは優れていますが、お勧めしません。
エラーがあれば訂正してください!