Visual Studio 2019中创建的C++项目无法使用万能头<bits/stdc++.h>解决方案

2023-11-06

**

Visual Studio 2019创建C++项目无法使用万能头<bits/stdc++.h>解决方案

**

  1. 打开一个C++项目在这里插入图片描述

  2. 鼠标移动至头文件上右击,选择转到文档在这里插入图片描述

  3. 右击iostream,打开所在文件夹在这里插入图片描述

  4. 新创建一个bits文件夹在这里插入图片描述

  5. 在bits文件夹中新建一个stdc++.h的文件,将以下内容写入stdc++.h中

#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

6.重启Visual Studio 2019,此时就可以正常使用bits/stdc++.h了
在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Visual Studio 2019中创建的C++项目无法使用万能头<bits/stdc++.h>解决方案 的相关文章

  • Linux命令_awk & 字符串过滤

    前言 被称为 Linux 文本操作三剑客之一的 awk 不但可以处理复杂文件输出 更是一门编程语言 支持对文本每行每列精确读出 格式化输出 正则匹配 if 判断 数组 循环 目录 1 语法 1 1 选项参数 1 2 内置变量 1 3 运算符

随机推荐

  • Integer.parseInt(s)与Integer.valueOf(s)的区别详解

    一 Integer parseInt s 用法 String s1 1000 String s2 1000 int n1 Integer parseInt s1 int n2 Integer parseInt s2 if n1 n2 Sys
  • Pycharm一复制就出现光标变成黑块,无法编辑

    光标变黑块是因为输入方式变成了改写方式 INSERT可以切换插入 改写模式 大多笔记本上是INS键 在键盘上 外接键盘一般是Insert键 但有时光按insert也不行 试试下面这个方法 file gt settings gt Plugin
  • 博客记录

    文章目录 一 3d点云 1 激光SLAM 1 从零开始做自动驾驶定位 2 点云匹配定位 1 NDT 二 编程 1 CMakeLists 三 Github 1 自动驾驶相关 四 Markdown 1 emoji 用来记录一下自己在学习的过程中
  • linux下文件的访问时间、修改时间和改变时间

    参考 linux下文件的创建时间 访问时间 修改时间和改变时间 刀刀的专栏 博客频道 CSDN NET http blog csdn net zyz511919766 article details 14452027 归纳一下 linux下
  • MyBatis动态拼接SQL

    通过使用MyBatis提供的标签方法可以实现动态SQL拼接 1 if标签
  • oracle时间获取记录

    select trunc sysdate from dual 2017 9 11 select trunc sysdate 1 from dual 2017 9 12 select sysdate from dual 从系统获取时间2017
  • VsCode怎么打开settings.json文件?

    Mac command shift p 输入setting json 选择 首选项 打开设置 json 即可
  • 使用Git进行版本控制,并将代码托管到GitHub的完整流程

    Git是一个分布式版本控制系统 它可以记录文件的修改历史 并且可以管理多人协作开发的项目 Git的基本工作流程如下 在开发者的本地电脑上安装Git 并克隆一个GitHub上已存在的项目到本地 在本地进行代码的修改和提交 这些修改都会被存储在
  • Android studio编译中Connect to maven.google.com:443[xxx] failed: connect timed out的解决方法

    前言 最近徒弟分到了一个rn的模块开发工作 但rn 大家懂的 Android studio有时需要科学上网下载必要的rn库 又是一个徒弟哀嚎的日子 问题 连接maven google com超时 具体编译报错如下 gt Could not
  • R语言-- R语言数据类型(3)

    列表 创建 1 1 创建一个列表L1 记录三位同学的姓名 A B C 编号 1 2 3 数学成绩 80 90 95 语文成绩 75 95 80 L1 lt list 姓名 c A B C 编号 c 1 2 3 数学 c 80 90 95 语
  • VPP代码阅读中文注解---dlmalloc.h

    Quickstart This library is all in one file to simplify the most common usage ftp it compile it O3 and link it into anoth
  • 大数据课程L3——网站流量项目的系统搭建

    文章作者邮箱 yugongshiye sina cn 地址 广东惠州 本章节目的 了解网站流量项目的运行环境 了解网站流量项目的日志采集系统搭建 了解网站流量项目的离线业务系统搭建 了解网站流量项目的Hive做离线数据处理 了解网站流量项目
  • js解leetcode(44)-简单

    1 有多少小于当前数字的数字 题目 给你一个数组 nums 对于其中每个元素 nums i 请你统计数组中比它小的所有数字的数目 换而言之 对于每个 nums i 你必须计算出有效的 j 的数量 其中 j 满足 j i 且 nums j l
  • Linux 下bsub命令

    一 bsub bsub 提交给lsf作业的命令 命令格式 bsub options command argument bsub pack job submission file q 选择队列 i 指定输入文件 I 交互模式 此时终端不能输入
  • RabbitMQ和Kafka的区别

    RabbitMQ 和 Apache Kafka 是两种流行的消息传递系统 它们具有不同的设计目标和适用场景 以下是它们的主要区别 消息传递模型 RabbitMQ RabbitMQ 是一个传统的消息队列系统 采用了基于消息队列的发布 订阅模型
  • 关于压缩感知的基本原理

    转自https blog csdn net wanz2 article details 52770095 该博客中作者介绍了传统的压缩和压缩感知 并且介绍了匹配追踪算法OMP的基本原理 让我看明白点了OMP算法 但是有一个疑问 如果不知道信
  • Unity下载大文件断点续传

    最近要使用安卓更新下载apk更新功能 由于安卓机运行内存有限 下载大文件就得采用实时下载写入 实时释放内存的方法 考虑到网络环境不稳定时下载被迫中断的情况 重新从头下载会导致不必要的资源浪费 断点续传也很有必要 UnityWebReques
  • 计算机网络第七版--概述知识点总结

    计算机网络第七版 谢希仁 第一章 概述 1 1 计算机网络在信息时代的应用 21世纪的一些重要的特征就是数字化 网络化和信息化 它是一个以网络为核心的信息时代 互联网具有两个重要的特点 连通性 交换各种信息 和共享 资源共享 1 2 互联网
  • Java核心——集合(一)接口

    集合框架围绕一组标准接口而设计 我们可以直接使用这些接口的标准实现 例如 LinkedList HashSet TreeSet等 除此之外还可以通过这些接口实现自己的集合 集合框架是一个用来代表和操纵集合的统一架构 所有的集合框架都包含如下
  • Visual Studio 2019中创建的C++项目无法使用万能头<bits/stdc++.h>解决方案

    Visual Studio 2019创建C 项目无法使用万能头