std::queue::empty

bool empty() const; Checks if the underlying container has no elements, i.e. whether c.empty(). Parameters (none). Return value true if the underlying container is empty, false otherwise. Complexity Constant. See also size returns the number of elements (public member function)

std::queue::emplace

template< class... Args > void emplace( Args&&... args ); (since C++11) Pushes new element to the end of the queue. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element is called with exactly the same arguments as supplied to the function. Effectively calls c.emplace_back(std::forward<Args>(args)...). Parameters args - arguments to forward to the constructor of the element Return value (none)

std::queue::back

reference back(); const_reference back() const; Returns reference to the last element in the queue. This is the most recently pushed element. Effectively calls c.back(). Parameters (none). Return value reference to the last element. Complexity Constant. See also front access the first element (public member function) push inserts element at the end (public member function)

std::queue

Defined in header <queue> template< class T, class Container = std::deque<T> > class queue; The std::queue class is a container adapter that gives the programmer the functionality of a queue - specifically, a FIFO (first-in, first-out) data structure. The class template acts as a wrapper to the underlying container - only a specific set of functions is provided. The queue pushes the elements on the back of the underlying container and pops them from the

std::qsort

Defined in header <cstdlib> extern "C" void qsort( void *ptr, std::size_t count, std::size_t size, int (*comp)(const void *, const void *) ); extern "C++" void qsort( void *ptr, std::size_t count, std::size_t size, int (*comp)(const void *, const void *) ); Sorts the given array pointed to by ptr in ascending order. The array contains count elements of size bytes. Function pointed to by comp is used for object comparison. If comp indicates two

std::put_time

Defined in header <iomanip> template< class CharT > /*unspecified*/ put_time( const std::tm* tmb, const CharT* fmt ); (since C++11) When used in an expression out << put_time(tmb, fmt), converts the date and time information from a given calendar time tmb to a character string according to format string fmt, as if by calling std::strftime, std::wcsftime, or analog (depending on CharT), according to the std::time_put facet of the locale currently imbued in the ou

std::put_money

Defined in header <iomanip> template< class MoneyT > /*unspecified*/ put_money( const MoneyT& mon, bool intl = false ); (since C++11) When used in an expression out << put_money(mon, intl), converts the monetary value mon to its character representation as specified by the std::money_put facet of the locale currently imbued in out. This function behaves as a FormattedOutputFunction. Parameters mon - a monetary value, either long double or basic_strin

std::putwchar

Defined in header <cwchar> wint_t putwchar( wchar_t ch ); Writes a wide character ch to stdout. Parameters ch - wide character to be written Return value ch on success, WEOF on failure. See also putchar writes a character to stdout (function) fputwcputwc writes a wide character to a file stream (function) C documentation for putwchar

std::puts

Defined in header <cstdio> int puts( const char *str ); Writes character string str and a newline to stdout. Parameters str - character string to be written Return value Non-negative number on success or EOF otherwise. See also fputs writes a character string to a file stream (function) printffprintfsprintfsnprintf (C++11) prints formatted output to stdout, a file stream or a buffer (function) C documentation for puts

std::putchar

Defined in header <cstdio> int putchar( int ch ); Writes a character ch to stdout. Internally, the character is converted to unsigned char just before being written. Equivalent to putc(ch, stdout). Parameters ch - character to be written Return value On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stdout. Example #include <cstdio> int main() { for (char c = 'a'; c != 'z'; c++)