LoginSignup
1
0

More than 1 year has passed since last update.

C++で<bits/stdc++.h>をincludeできるように

Last updated at Posted at 2022-06-01

はじめに

Windows環境のCLionを用いたときにどうやって#include <bits/stdc++.h>すればいいのかな、Macの記事しかないな、という感じで書いた記事です。
ちなみに競技プログラミング(AtCoder)用です。

  • CMake
  • Visual Studio 2022

試した方法

stdc++.hファイルの設置

ディレクトリC:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/include/bits/フォルダを作成して、以下のファイルを追加しました。

stdc++.h

stdc++.h
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cmath>
#include <numeric>
#include <iomanip>

※一部AtCoder記事 を引用しています。

CMakeListsの編集

CMakeLists.txt
include_directories("C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/include/bits")

を追加しました。

C++ファイルの編集

これで、無事

#include <bits/stdc++.h>

ができました!

本当になんとなくローカルでできただけの話なので、参考程度にでもしていただけると幸いです。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0