What Is the C++ Standard Library Complex Numbers Library?
The C++ <complex> header provides std::complex for numbers with real and imaginary parts. See construction, arithmetic, polar form and math functions with examples.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
The C++ <complex> header provides std::complex for numbers with real and imaginary parts. See construction, arithmetic, polar form and math functions with examples.
The C++ utility components include pair, tuple, move, forward, swap and exchange. See how each works, with structured bindings and C++20 integer comparison.
C++ type traits in <type_traits> let templates inspect and transform types at compile time. See query and transformation traits with modern C++17 and C++20 examples.
How std::chrono works in modern C++: durations, clocks and time points, accurate timing with steady_clock and the C++20 calendar types.
The C++11 future library passes results between threads with std::future, std::promise, std::async and packaged_task. See launch policies and common traps.
A practical tour of C++ concurrency: creating threads, protecting shared data with mutexes, signalling with condition variables and using futures.
std::atomic makes shared variables safe across threads without a mutex. See core operations, compare-exchange loops, memory ordering and common pitfalls.
Use the C++ <regex> library to match, search and replace text. Examples cover capture groups, iterators, flags, std::regex_error and performance tips.
The C++17 std::filesystem library gives portable tools for paths, files and directories. See paths, directory iteration, copying and error handling in practice.
C++ I/O streams give console, files and strings one type-safe interface. Learn the classes, formatting manipulators, error handling and std::print.
Learn how std::string works in modern C++, from concatenation and searching to string_view, std::format and number conversion.
A tour of the C++ numerics headers: cmath, numeric, random, limits, complex and numbers, with modern C++20 replacements for M_PI and rand().
Iterators let C++ algorithms work on any container. Learn the categories, adaptors, invalidation rules and how C++20 ranges change iterator use.
C++ standard containers store and manage collections of objects. Compare vector, map, unordered_map, set and adaptors, with examples and guidance on choosing.
A tour of the C++ Standard Library by category: I/O, strings, algorithms, math and utilities, with working examples using modern C++.
The C++ Standard Library algorithms are generic functions for searching, sorting, transforming and reducing sequences. Learn the categories, C++20 ranges and parallel policies.
The C++ STL is built from containers, iterators, algorithms and function objects. See how they work together, which container to choose and how C++20 ranges help.
The C++ Standard Library gives every C++ program containers, algorithms, strings, streams and utilities. See what it contains and how each standard extended it.
The C++ Core Guidelines are an open set of rules for writing safe, modern C++. See how they are organised and how to enforce them with clang-tidy.
An lvalue in C++ has identity; an rvalue is a temporary or expiring object. Learn value categories, rvalue references, std::move and forwarding.