如何在MAC OS中的XCODE下添加 <bits/stdc++.h>

        mac上使用的编译器是Clang,但是没有万能头文件bits/stdc++.h\,本文介绍如何添加万能头文件

        Xcode 版本:15.1

 - 打开应用程序-Xcode-右键显示包内容

Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include

        低版本: 

Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 

 - 在该文件夹下创建文件名为 bits 文件夹

- 创建stdc++.h头文件 

   

代码如下,也可直接下载导入,资源置顶免费下载

// C++ includes used for precompiling -*- C++ -*-// Copyright (C) 2003-2014 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 

导入或新建成功之后,即可使用

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/584971.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【Linux】实现windows主机与ubuntu虚拟机系统之间文件/字符复制粘贴

环境 硬件&#xff1a;通用PC 系统&#xff1a;Ubuntu 18.04 《 》Windows10 软件 &#xff1a;VMware Workstation 16 Pro 解决 0、现象 使用Ubuntu 虚拟机时&#xff0c;有时需要来回复制文件或者字符串到主机或虚拟机。 1、分析 2、思路 3、解决 //先安装open-vm-to…

Java基础语法

文章目录 注意&#xff1a;day01 - Java基础语法1. 人机交互1.1 什么是cmd&#xff1f;1.2 如何打开CMD窗口&#xff1f;1.3 常用CMD命令1.4 CMD练习1.5 环境变量 2. Java概述1.1 Java是什么&#xff1f;1.2下载和安装1.2.1 下载1.2.2 安装1.2.3 JDK的安装目录介绍 1.3 HelloWo…

Mybatis SQL构建器类 - SqlBuilder and SelectBuilder (已经废弃)

在3.2版本之前&#xff0c;我们采用了一种略有不同的方法&#xff0c;通过利用ThreadLocal变量来掩盖一些使Java DSL有点繁琐的语言限制。然而&#xff0c;这种方法现在已被弃用&#xff0c;因为现代框架已经普及了使用构建器模式和匿名内部类的概念。因此&#xff0c;SelectBu…

python/selenium/jenkins整合

1、新建python项目&#xff0c;专门写selenium代码&#xff0c;建议用pytest框架写。 2、把代码上传到代码库中。 3、环境配置&#xff1a; 3.1 在跑jenkins的机器上配置好python环境&#xff0c;需要python --version能在任何地方运行&#xff08;配置好系统环境变量&#…

水准网、平面导线平差

东北大学测绘工程水准网、平面闭合导线间接平差法平差C#项目。 闭合导线程序界面&#xff1a; 水准网程序界面&#xff1a; 项目gitee地址&#xff1a; horizon: 东北大学测绘工程水准网&#xff0c;闭合导线间接平差法C#项目 (gitee.com) 注&#xff1a;此项目为本博主代人转…

【连接池】-从源码到适配(下),使用dynamic-datasource导致连接池没生效(升级版本)

写在前面 书接上文&#xff0c;连接池没生效&#xff0c;启用了一个什么默认的连接池。具体是什么&#xff0c;一起来看看源码吧。 目录 写在前面一、问题描述二、本地调试三、升级dynamic-datasource四、新的问题&#xff08;一&#xff09;数据源初始化问题&#xff08;二&am…

css+js实现鼠标移动边框高亮效果

前言&#xff1a;效果是鼠标移入空白区域&#xff0c;边框高亮的效果。效果是在douyin的渡一教育袁老师的课程学习到的&#xff0c;观看以后是一个实用的小特效。想看的可以平台查询&#xff0c;自己也学到了知识。 <!DOCTYPE html> <html lang"en"> <…

Selenium在vue框架下求生存

vue框架下面&#xff0c;没有id、没有name&#xff0c;vue帮开发做了很多脏活累活&#xff0c;却委屈了写页面自动化测试的人&#xff08;当然&#xff0c;也给爬信息的也带来了一定的难处&#xff09;。这里只能靠总结&#xff0c;用一些歪门邪道&#xff1a; 一、跟开发商量…

安装Windows版本沐神的autocut

参考 下载完autocut以后 1 下载ffmpeg

ios苹果app应用程序录屏开发有哪些难点和注意点?

首先&#xff0c;让我们简单了解一下iOS录屏的基本原理。iOS录屏是指将设备屏幕上的内容实时捕捉并保存为视频文件的过程。这在教学、演示和用户支持等场景中非常有用。iOS录屏可以通过使用ReplayKit框架来实现&#xff0c;该框架提供了一套API&#xff0c;用于捕捉屏幕上的内容…

Notepad++批量更改文件编码格式及文档格式

背景&#xff1a; 在项目中遇到Windows平台VS的MSVC编译不识别Unix下UTF-8编码导致的编译失败问题。需要将Unix下的UTF-8转为UTF-8-BOM格式。网上找了些方式&#xff0c;之后又深入探究了下文档转换的可能性&#xff0c;共享给大家。&#xff08;当然Windows和Unix平台代码格式…

Halcon阈值处理的几种分割方法threshold/auto_threshold/binary_threshold/dyn_threshold

Halcon阈值处理的几种分割方法 文章目录 Halcon阈值处理的几种分割方法1. 全局阈值2. 基于直方图的自动阈值分割方法3. 自动全局阈值分割方法4. 局部阈值分割方法5. var_threshold算子6 . char_threshold 算子7. dual_threshold算子 在场景中选择物体或特征是图像测量或识别的重…

Linux网络编程学习心得.4

1.epoll工作模式 水平触发 LT 边沿触发 ET 因为设置为水平触发,只要缓存区有数据epoll_wait就会被触发,epoll_wait是一个系统调用,尽量少调用 所以尽量使用边沿触发,边沿出触发数据来一次只触发一次,这个时候要求一次性将数据读完,所以while循环读,读到最后read默认带阻塞…

springboot(ssm火锅店管理系统 火锅在线点餐系统 Java系统

springboot(ssm火锅店管理系统 火锅在线点餐系统 Java系统 开发语言&#xff1a;Java 框架&#xff1a;ssm/springboot vue JDK版本&#xff1a;JDK1.8&#xff08;或11&#xff09; 服务器&#xff1a;tomcat 数据库&#xff1a;mysql 5.7&#xff08;或8.0&#xff09; …

Java中的设计模式

设计模式是软件开发中常见问题的可重用解决方案。在Java中&#xff0c;设计模式有助于提高代码的可维护性、可读性和可扩展性。以下是一篇关于Java中设计模式的文章&#xff0c;以帮助您更好地理解这些模式。 一、设计模式简介 设计模式是经过验证的解决方案&#xff0c;用于…

Glary Utilities Pro - 电脑系统优化全面指南:详尽使用教程

软件简介&#xff1a; Glary Utilities Pro 是一款全面的电脑优化工具&#xff0c;它旨在帮助用户提升计算机的性能和稳定性。这款软件提供了多种功能&#xff0c;包括系统清理、优化、修复以及保护。通过一键扫描&#xff0c;它可以识别并清除无用文件、临时数据、注册表错误等…

AI大模型时代下运维开发探索第二篇:基于大模型(LLM)的数据仓库

在SREWorks社区聚集了很多进行运维数仓建设的同学&#xff0c;大家都会遇到类似的挑战和问题&#xff1a; 数仓中存储大量数据消耗成本&#xff0c;但很多存储的数据却并没有消费。进数仓的ETL学习成本高、管理成本高&#xff0c;相关同学配合度低&#xff0c;以及上游结构改动…

【Go语言入门:Go语言的方法,函数,接口】

文章目录 4.Go语言的方法&#xff0c;函数&#xff0c;接口4.1. 方法4.1.1. 指针接受者4.1.2. 值接收者和指针接收者有什么区别&#xff1f;4.1.3. 方法 4.2. 接口4.2.1. 接口定义 4.3. 函数4.3.1. 函数介绍 4.Go语言的方法&#xff0c;函数&#xff0c;接口 4.1. 方法 4.1.1…

element表格排序功能

官方展示 个人项目 可以分别对每一项数据进行筛选 注&#xff1a;筛选的数据不能是字符串类型必须是数字类型&#xff0c;否则筛选会乱排序 html <el-table :data"tableData" border height"600" style"width: 100%"><el-table-co…

spring boot使用配置文件对静态变量进行赋值

spring boot value ConfigurationProperties 注释静态配置文件变量引用 1.value 标签加在set方法上面&#xff0c;注意set方法是非静态 private static String userName;Value(value "${user.userName}")public void setUserName(String userName) {HelloWorldServ…