string literal

Syntax " (unescaped_character|escaped_character)* " (1) L " (unescaped_character|escaped_character)* " (2) u8 " (unescaped_character|escaped_character)* " (3) (since C++11) u " (unescaped_character|escaped_character)* " (4) (since C++11) U " (unescaped_character|escaped_character)* " (5) (since C++11) prefix(optional) R "delimiter( raw_character* )delimiter" (6) (since C++11) Explanation unescaped_character - Any valid character escaped_charact

std::basic_fstream::close

void close(); Closes the associated file. Effectively calls rdbuf()->close(). If an error occurs during operation, setstate(failbit) is called. Parameters (none). Return value (none). Notes This function is called by the destructor of basic_fstream when the stream object goes out of scope and is not usually invoked directly. Example #include <string> #include <fstream> #include <iostream> int main() { std::fstream f1("example1", std::ios::out),

std::weibull_distribution

Defined in header <random> template< class RealType = double > class weibull_distribution; (since C++11) The weibull_distribution meets the requirements of a RandomNumberDistribution and produces random numbers according to the Weibull distribution: f(x;a,b) = ab ⎛⎜⎝ xb ⎞⎟⎠a-1 exp⎛⎜⎝-⎛⎜⎝ xb ⎞⎟⎠a⎞⎟⎠ a is the shape parameter and b the scale parameter. std::weibull_distribution satisfies RandomNumberDistribution. Template parameters RealType - The result

forward_list

This header is part of the containers library. Includes <initializer_list>(C++11) Classes forward_list (since C++11) singly-linked list (class template) Functions operator==operator!=operator<operator<=operator>operator>= lexicographically compares the values in the forward_list (function template) std::swap(std::forward_list) (C++11) specializes the std::swap algorithm (function template) Synopsis namespace std { #include <initializ

std::size_t

Defined in header <cstddef> Defined in header <cstdio> Defined in header <cstring> Defined in header <ctime> Defined in header <cstdlib> (since C++11) Defined in header <cwchar> (since C++11) typedef /*implementation-defined*/ size_t; std::size_t is the unsigned integer type of the result of the sizeof operator as well as the sizeof... operator and the alignof operator (since C++11). Notes std::size_t can store

std::exp2

Defined in header <cmath> double exp2( double n ); (1) (since C++11) float exp2( float n ); (2) (since C++11) long double exp2( long double n ); (3) (since C++11) double exp2( Integral n ); (4) (since C++11) 1-3) Computes 2 raised to the given power n 4) A set of overloads or a function template accepting an argument of any integral type. Equivalent to 2) (the argument is cast to double). Parameters n - value of floating-point or

std::min_element

Defined in header <algorithm> (1) template< class ForwardIt > ForwardIt min_element( ForwardIt first, ForwardIt last ); (until C++17) template< class ForwardIt > constexpr ForwardIt min_element( ForwardIt first, ForwardIt last ); (since C++17) (2) template< class ForwardIt, class Compare > ForwardIt min_element( ForwardIt first, ForwardIt last, Compare comp ); (until C++17) template< class ForwardIt, class Compare > constexpr ForwardIt

std::set_intersection

Defined in header <algorithm> template< class InputIt1, class InputIt2, class OutputIt > OutputIt set_intersection( InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt d_first ); (1) template< class InputIt1, class InputIt2, class OutputIt, class Compare > OutputIt set_intersection( InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,

std::sort

Defined in header <algorithm> template< class RandomIt > void sort( RandomIt first, RandomIt last ); (1) template< class RandomIt, class Compare > void sort( RandomIt first, RandomIt last, Compare comp ); (2) Sorts the elements in the range [first, last) in ascending order. The order of equal elements is not guaranteed to be preserved. The first version uses operator< to compare the elements, the second version uses the given comparison function object

list initialization

Initializes an object from braced-init-list. Syntax direct-list-initialization T object { arg1, arg2, ... }; (1) T { arg1, arg2, ... }; (2) new T { arg1, arg2, ... } (3) Class { T member { arg1, arg2, ... }; }; (4) Class::Class() : member{arg1, arg2, ...} {... (5) copy-list-initialization T object = {arg1, arg2, ...}; (6) function( { arg1, arg2, ... } ) ; (7) return { arg1, arg2, ... } ; (8) object[ { arg1, arg2, ... } ] ; (9