Statements

Statements are fragments of the C++ program that are executed in sequence. The body of any function is a sequence of statements. For example: int main() { int n = 1; // declaration statement n = n+1; // expression statement std::cout << "n = " << n << '\n'; // expression statement return 0; // return statement } There are seven types of statements: 1) expression statement 2) compound statement 3) selection statement 4) iteration statement 5) jump statemen

Static Assertion

Performs compile-time assertion checking. Syntax static_assert ( bool_constexpr , message ) (since C++11) static_assert ( bool_constexpr ) (since C++17) Explanation bool_constexpr - a constant expression that is contextually convertible to bool message - optional (since C++17)string literal that will appear as compiler error if bool_constexpr is false A static assert declaration may appear at block scope (as a block declaration) and inside a class body (as a m

stack

This header is part of the containers library. Includes <initializer_list>(C++11) Classes stack adapts a container to provide stack (LIFO data structure) (class template) std::uses_allocator<std::stack> (C++11) specializes the std::uses_allocator type trait (function template) Functions operator==operator!=operator<operator<=operator>operator>= lexicographically compares the values in the stack (function template) std::swap(std::stack)

StandardLayoutType

Specifies that a type is standard layout type. Standard layout types are useful for communicating with code written in other programming languages. Note, that the standard doesn't define a named requirement or concept with this name. This is a type category defined by the core language. It is included here as concept only for consistency. Requirements All non-static data members have the same access control Has no virtual functions or virtual base classes All non-static data members and

sstream

This header is part of the Input/Output library. Classes basic_stringbuf implements raw string device (class template) basic_istringstream implements high-level string stream input operations (class template) basic_ostringstream implements high-level string stream output operations (class template) basic_stringstream implements high-level string stream input/output operations (class template) Typedefs stringbuf basic_stringbuf<char> wstringbuf basic_str

Source file inclusion

Includes other source file into current source file at the line immediately after the directive . Syntax #include <filename> (1) #include "filename" (2) __has_include ( " filename " )__has_include ( < filename > ) (3) (since C++17) Any preprocessing tokens (macro constants or expressions) are permitted as arguments to #include and __has_include (since C++17) as long as they expand to a sequence of characters surrounded by < > or " ". Explanation 1,2

sizeof

Usage sizeof operator sizeof... operator (since C++11)

signed

Usage signed type modifier

sizeof... operator

Queries the number of elements in a parameter pack. Syntax sizeof...( parameter_pack ) (since C++11) Returns a constant of type std::size_t. Explanation Returns the number of elements in a parameter pack. Keywords sizeof. Example #include <iostream> #include <array> template<typename... Ts> constexpr auto make_array(Ts&&... ts) -> std::array<std::common_type_t<Ts...>,sizeof...(ts)> { return { std::forward<Ts>(ts)...

SIG_DFL

Defined in header <csignal> #define SIG_DFL /*implementation defined*/ #define SIG_IGN /*implementation defined*/ The SIG_DFL and SIG_IGN macros expand into integral expressions that are not equal to an address of any function. The macros define signal handling strategies for std::signal() function. Constant Explanation SIG_DFL default signal handling SIG_IGN signal is ignored See also C documentation for SIG_DFL, SIG_IGN