Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> C++

C++ Standard Library Header Files


C++ Standard Library Header Files แบ่งตามหมวดหมู่

Utilities Library

  • <cstdlib> - General utilities: program control, dynamic memory, random, sort, search
  • <csignal> - Signal management (SIGINT, etc.)
  • <csetjmp> - Save/jump execution context
  • <cstdarg> - Variable argument lists
  • <typeinfo> - Runtime type information
  • <bitset> - std::bitset
  • <functional> - Function objects, bind, reference wrappers
  • <utility> - Utility components
  • <ctime> - C-style time/date
  • <cstddef> - Standard macros/typedefs
  • <typeindex> (C++11) - Wrapper for type_info
  • <type_traits> (C++11) - Compile-time type info
  • <chrono> (C++11) - Time utilities
  • <initializer_list> (C++11) - Lightweight proxy for arrays
  • <tuple> (C++11) - Fixed-size heterogeneous collection
  • <any> (C++17) - Type-safe container for single value
  • <optional> (C++17) - Optional contained value
  • <variant> (C++17) - Type-safe union
  • <compare> (C++20) - Three-way comparison

Dynamic Memory Management

  • <new> - Low-level memory management
  • <memory> - High-level memory management (smart pointers)
  • <scoped_allocator> (C++11) - Multi-level containers
  • <memory_resource> (C++17) - Memory resource interface

Numeric Limits

  • <climits> - Integral type limits
  • <cfloat> - Float type limits
  • <limits> - Standardized arithmetic type properties
  • <cstdint> (C++11) - Fixed-size types
  • <cinttypes> (C++11) - C-style I/O macros for cstdint types

Error Handling

  • <exception> - Exception handling
  • <stdexcept> - Standard exception objects
  • <cassert> - Assert macro
  • <cerrno> - Error number macro
  • <system_error> (C++11) - Platform-dependent error codes

Strings Library

  • <cctype> - Character classification
  • <cwctype> - Wide character classification
  • <cstring> - Narrow string functions
  • <cwchar> - Wide/multibyte string functions
  • <string> - std::basic_string
  • <cuchar> (C++11) - Unicode conversion
  • <string_view> (C++17) - Non-owning string reference

Containers Library

  • <array> (C++11), <vector>, <deque>, <list>, <forward_list> (C++11)
  • <set>, <map>, <unordered_set> (C++11), <unordered_map> (C++11)
  • <stack>, <queue>

Algorithms & Iterators

  • <algorithm> - Container algorithms
  • <execution> (C++17) - Parallel execution policies
  • <iterator> - Iterators

Numerics Library

  • <cmath>, <complex>, <valarray>, <random> (C++11), <numeric>, <ratio> (C++11), <cfenv> (C++11)

Input/Output Library

  • <iosfwd>, <ios>, <istream>, <ostream>, <iostream>
  • <fstream>, <sstream>, <syncstream> (C++20)
  • <iomanip>, <streambuf>, <cstdio>

Localization & Regex

  • <locale>, <clocale>, <codecvt> (C++11, deprecated C++17)
  • <regex> (C++11) - Regular expressions

Atomic & Thread Support

  • <atomic> (C++11)
  • <thread>, <mutex>, <shared_mutex> (C++14), <future>, <condition_variable> (all C++11)

Filesystem

  • <filesystem> (C++17) - std::path และฟังก์ชันไฟล์