Namespaces
Variants
Views
Actions

Standard library header <cstdlib>

From cppreference.com
< cpp‎ | header

This header was originally in the C standard library as <stdlib.h>.

This header provides miscellaneous utilities. Symbols defined here are used by several library components.

Contents

[edit] Macro constants

indicates program execution execution status
(macro constant) [edit]
MB_CUR_MAX
maximum number of bytes in a multibyte character with the current locale
(macro constant)
implementation-defined null pointer constant
(macro constant) [edit]
maximum possible value generated by std::rand
(macro constant) [edit]

[edit] Types

structure type, return of the std::div function
(typedef) [edit]
structure type, return of the std::ldiv function
(typedef) [edit]
(C++11)
structure type, return of the std::lldiv function
(typedef) [edit]
unsigned integer type returned by the sizeof operator
(typedef) [edit]

[edit] Functions

Process control
causes abnormal program termination (without cleaning up)
(function) [edit]
causes normal program termination with cleaning up
(function) [edit]
causes quick program termination without completely cleaning up
(function) [edit]
(C++11)
causes normal program termination without cleaning up
(function) [edit]
registers a function to be called on std::exit() invocation
(function) [edit]
registers a function to be called on quick_exit invocation
(function) [edit]
calls the host environment's command processor
(function) [edit]
access to the list of environment variables
(function) [edit]
Memory management
allocates memory
(function)
allocates and zeroes memory
(function)
expands previously allocated memory block
(function)
deallocates previously allocated memory
(function)
Numeric string conversion
converts a byte string to a floating point value
(function) [edit]
converts a byte string to an integer value
(function) [edit]
converts a byte string to an integer value
(function) [edit]
converts a byte string to an unsigned integer value
(function) [edit]
converts a byte string to a floating point value
(function) [edit]
Wide string manipulation
returns the number of bytes in the next multibyte character
(function) [edit]
converts the next multibyte character to wide character
(function) [edit]
converts a wide character to its multibyte representation
(function) [edit]
converts a narrow multibyte character string to wide string
(function) [edit]
converts a wide string to narrow multibyte character string
(function) [edit]
Miscellaneous algorithms and math
generates a pseudo-random number
(function) [edit]
seeds pseudo-random number generator
(function) [edit]
sorts a range of elements with unspecified type
(function) [edit]
searches an array for an element of unspecified type
(function) [edit]
computes absolute value of an integral value (|x|)
(function) [edit]
computes quotient and remainder of integer division
(function) [edit]

[edit] See Also