首页 > 编程语言 >c++万能头文件

c++万能头文件

时间:2023-04-21 20:02:43浏览次数:31  
标签:头文件 GNU 万能 c++ version C++ include Public define

#include <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

部分常用代码模板

#include<bits/stdc++.h>
#define pii pair<int,int>
#define ll long long
#define cl(x,y) memset(x,y,sizeof(x))
#define ct cerr<<"Time elapsed:"<<1.0*clock()/CLOCKS_PER_SEC<<"s.\n";
const int N=1e6+10;
const int mod=1e9+7;
const int maxn=0x3f3f3f3f;
const int minn=0xc0c0c0c0;
const int inf=99999999;
using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	/* memset(a,0x3f,sizeof(a)); */
	/* code */
	return 0;
}

标签:头文件,GNU,万能,c++,version,C++,include,Public,define
From: https://www.cnblogs.com/catting123/p/17341591.html

相关文章

  • C/C++课程信息管理系统[2023-04-21]
    C/C++课程信息管理系统[2023-04-21]综合应用所学C语言知识,设计完成一个软件工程专业课程信息管理系统。本系统拟实现以下功能:【数据文件】课程信息数据文件。每门课程的信息包含:课程编号,课程名称,理论课时实验课时、学分、开课学期(8个学期)、课程性质《分为必修、选修、限......
  • c++训练打卡(13)
    分糖果问题:10个小孩围成一圈分糖果,老师分给第1个小孩10块,第2个小孩2块,第3个小孩8块,第4个小孩22块,第5个小孩16块,第6个小孩4块,第7个小孩10块,第8个小孩6块,第9个小孩14块,第10个小孩20块。然后所有的小孩同时将手中的糖分一半给右边的小孩;糖块数为奇数的人可向老师要一块。问经过这样......
  • 开心档之C++ 类 & 对象
    C++类&对象C++在C语言的基础上增加了面向对象编程,C++支持面向对象程序设计。类是C++的核心特性,通常被称为用户定义的类型。类用于指定对象的形式,它包含了数据表示法和用于处理数据的方法。类中的数据和方法称为类的成员。函数在一个类中被称为类的成员。C++类定义定......
  • 开心档之C++ 基本语法
    C++基本语法C++程序可以定义为对象的集合,这些对象通过调用彼此的方法进行交互。现在让我们简要地看一下什么是类、对象,方法、即时变量。对象- 对象具有状态和行为。例如:一只狗的状态-颜色、名称、品种,行为-摇动、叫唤、吃。对象是类的实例。类- 类可以定义为描述对......
  • [c/c++]3.如何查看和更改程序运行栈的大小
    进程内存布局 我们写程序运行栈的栈帧保存在栈区,函数调用深度太多将导致爆栈栈的大小有上限,每个进程可以指定软上限,操作系统可指定硬上限linux查看栈上限方法linux可以通过ulimit命令查看栈上限和设置上限ulimit-a查看进程所有资源上限ulimit-sxx修改栈上限......
  • C++——string 成员函数 length(),size() 和 C strlen() 的区别
    //方法一:调用length()或size()stringstrTest="test";strTest.length();//4strTest.size();//4//方法二:转为C风格字符串,调用strlen()strlen(strTest.c_str());//4注意:当string中含有空字符’\0’,使用 strlen()获取stri......
  • 《花雕学AI》24:如何用万能Prompt公式与ChatGPT进行高效的对话测试
    引言你是否想要与人工智能进行有趣、有价值、有说服力的对话?你是否想要使用ChatGPT这个强大而灵活的对话生成器来创造出任何类型和主题的对话?如果是这样,那么你需要了解一个简单而强大的工具,就是万能Prompt公式。万能Prompt公式是一种用于生成任何类型和主题的对话的模板,它可以帮......
  • c++编译报错 error: parse error in template argument list
    [57%]BuildingCXXobjectdnet/CMakeFiles/dnet.dir/dconfig/dconfig_manager.cpp.oInfileincludedfrom/home/vi/git/dos/dnet/dconfig/dconfig_manager.cpp:1:/home/vi/git/dos/dnet/./dconfig/dconfig_manager.h:Inmemberfunction‘Tdnet::dconfig_manager::get_......
  • C++11之std::future对象的基本用法
    1、//futureexample#include<iostream>//std::cout#include<future>//std::async,std::future#include<chrono>//std::chrono::milliseconds//anon-optimizedwayofcheckingforprimenumbers:boolis_prime......
  • 一维与二维前缀和(蓝桥杯复习+例题讲解+模板c++)
    文章目录前缀和二维前缀和总结3956.截断数组99.激光炸弹前缀和前缀和是一种常见的算法,用于快速计算数组中某一段区间的和。前缀和的思想就是预处理出数组中前缀和,然后用后缀和减去前缀和,即可快速计算区间和。以一维数组为例,设表示数组中第个元素的值,表示数组中前个元素的......